diff --git a/src/Form/Form.php b/src/Form/Form.php index dd97618..b634115 100644 --- a/src/Form/Form.php +++ b/src/Form/Form.php @@ -15,7 +15,7 @@ use ctiso\Form\Field, /** * Форма для ввода */ -class Form extends View { +class Form { public $field = array(); //Поля формы public $fieldsets = array(); //Группы полей (fieldset). Некоторые поля могут не принадлежать никаким группам @@ -28,7 +28,7 @@ class Form extends View { public $_title = array(); public $alias = array(); - public $constructor = array(); + private $constructor = array(); /** * Строим форму по ее структуре. Каждому типу соответствует определенный класс. @@ -175,7 +175,7 @@ class Form extends View { { foreach ($schema as $key => $conv) { list($value, $type) = $conv; - $this->field [$key]->setValue(call_user_func(['ctiso\\Primitive', 'from_' . $type], $data->$value)); + $this->field [$key]->setValue(call_user_func([\ctiso\Primitive::class, 'from_' . $type], $data->$value)); } } @@ -183,17 +183,7 @@ class Form extends View { { $this->field[$name]->setValue($value); } - - public function getSchema() { - return [ - 'field' => $this->field, - 'fieldset' => $this->fieldsets, - 'method' => $this->method, - 'action' => $this->action, - 'header' => $this->header - ]; - } - + function execute() { return $this; diff --git a/src/View/Composite.php b/src/View/Composite.php index aa2890a..6edba92 100644 --- a/src/View/Composite.php +++ b/src/View/Composite.php @@ -1,13 +1,8 @@