jablonka.czprosek.czf

freenet-router

Subversion Repositories:
[/] [trunk/] [freenet-router/] [var/] [www/] [freenet-router/] [Framework/] [Libraries/] [Forms/] [Model/] [Form.php] - Rev 2

Compare with Previous - Blame - Download


<?php

namespace Phem\Libraries\Forms\Model;

/**
 * @Entity(readOnly=true) @Table(name="povruc_form") 
 * 
 */
class Form
{

    /** @Id @Column(type="integer") */
    private $id;

    /** @Column(type="string") */
    private $name;

    /** @Column(type="string") */
    private $method;

    /** @Column(type="string") */
    private $action;

    /** @Column(type="integer") */
    private $highlightPrefilled;

    /**
     *
     * @OneToMany(targetEntity="FormGroup", mappedBy="form",cascade={"all"})
     * @OrderBy({"order" = "ASC"})
     * @var \Phem\Core\Collection Description
     */
    private $groups;
    private $showErrors;
    private $ajax;
    protected $submittedButton;
    protected $defaultGroup;
    protected $criticalFields;

    public function getId()
    {
        return $this->id;
    }

    public function setId($id)
    {
        $this->id = $id;
    }

    public function getName()
    {
        return $this->name;
    }

    public function setName($name)
    {
        $this->name = $name;
    }

    public function getMethod()
    {
        return $this->method;
    }

    public function setMethod($method)
    {
        $this->method = $method;
    }

    public function getAction()
    {
        return $this->action;
    }

    public function setAction($action)
    {
        $this->action = $action;
    }

    public function getGroups()
    {
        return $this->groups;
    }

    public function setGroups($groups)
    {
        $this->groups = $groups;
    }

    public function getShowErrors()
    {
        return $this->showErrors;
    }

    public function setShowErrors($showErrors)
    {
        $this->showErrors = $showErrors;
    }

    public function getHighlightPrefilled()
    {
        return $this->highlightPrefilled;
    }

    public function setHighlightPrefilled($highlightPrefilled)
    {
        $this->highlightPrefilled = $highlightPrefilled;
    }

    public function getDefaultGroup()
    {
        return $this->defaultGroup;
    }

    public function setDefaultGroup($defaultGroup)
    {
        $this->defaultGroup = $defaultGroup;
    }

    public function getCriticalFields()
    {
        return $this->criticalFields;
    }

    public function setCriticalFields($criticalFields)
    {
        $this->criticalFields = $criticalFields;
    }

    public function getAjax()
    {
        return $this->ajax;
    }

    public function setAjax($ajax)
    {
        $this->ajax = $ajax;
    }
    
    public function getSubmittedButton()
    {
        return $this->submittedButton;
    }

    public function setSubmittedButton($submittedButton)
    {
        $this->submittedButton = $submittedButton;
    }

    public function getGroup($id)
    {
        foreach ($this->getGroups() as $group)
        {
            if ($group->getId() == $id)
                return $group;
        }
    }

    public function getField($id)
    {
        foreach ($this->getGroups() as $group)
        {
            foreach ($group->getFields() as $field)
            {
                if ($field->getId() == $id)
                    return $field;
            }
        }
    }

}

Powered by WebSVN 2.2.1