freenet-router |
Subversion Repositories: |
Compare with Previous - Blame - Download
<?php
namespace Phem\Libraries\Forms\Model;
/**
* @Entity(readOnly=true) @Table(name="povruc_form_group")
*
*/
class FormGroup
{
/** @Id @Column(type="integer") */
protected $id;
/**
* @ManyToOne(targetEntity="Form",cascade={"persist"})
* @JoinColumn(name="form", referencedColumnName="id")
*/
protected $form;
/** @Column(type="string") */
protected $name;
/** @Column(type="string") */
protected $caption;
/** @Column(type="boolean") */
protected $enabled;
/** @Column(type="integer") */
protected $order;
/**
*
* @OneToMany(targetEntity="FormField", mappedBy="group",cascade={"all"})
* @OrderBy({"order" = "ASC"})
*/
protected $fields;
protected $show;
protected $defaultOpen;
public function getId()
{
return $this->id;
}
public function setId($id)
{
$this->id = $id;
}
public function getForm()
{
return $this->form;
}
public function setForm($form)
{
$this->form = $form;
}
public function getName()
{
return $this->name;
}
public function setName($name)
{
$this->name = $name;
}
public function getCaption()
{
return $this->caption;
}
public function setCaption($caption)
{
$this->caption = $caption;
}
public function getEnabled()
{
return $this->enabled;
}
public function setEnabled($enabled)
{
$this->enabled = $enabled;
}
public function getOrder()
{
return $this->order;
}
public function setOrder($order)
{
$this->order = $order;
}
public function getFields()
{
return $this->fields;
}
public function setFields($fields)
{
$this->fields = $fields;
}
public function getShow()
{
return $this->show;
}
public function setShow($show)
{
$this->show = $show;
}
public function getDefaultOpen()
{
return $this->defaultOpen;
}
public function setDefaultOpen($defaultOpen)
{
$this->defaultOpen = $defaultOpen;
}
public function hasEnabledFields()
{
foreach ($this->getFields() as $field)
{
if ($field->getEnabled())
{
return true;
}
}
return false;
}
}