FOF30\Model\DataModel::getForm PHP Метод

getForm() публичный Метод

A method for getting the form from the model.
С версии: 2.0
public getForm ( array $data = [], boolean $loadData = true, boolean $source = null ) : Form | boolean
$data array Data for the form.
$loadData boolean True if the form is to load its own data (default case), false if not.
$source boolean The name of the form. If not set we'll try the form_name state variable or fall back to default.
Результат FOF30\Form\Form | boolean A Form object on success, false on failure
    public function getForm($data = array(), $loadData = true, $source = null)
    {
        $this->_formData = $data;
        if (empty($source)) {
            $source = $this->formName;
        }
        if (empty($source)) {
            $source = 'form.' . $this->name;
        }
        $name = $this->container->componentName . '.' . $this->name . '.' . $source;
        $options = array('control' => false, 'load_data' => &$loadData);
        $this->triggerEvent('onBeforeLoadForm', array(&$name, &$source, &$options));
        $form = $this->loadForm($name, $source, $options);
        if (is_object($form) && $form instanceof Form) {
            $this->triggerEvent('onAfterLoadForm', array(&$form, &$name, &$source, &$options));
            return $form;
        }
        return false;
    }