public function __construct(array $dataray = array()) { if (isset($dataray['form']) && is_object($dataray['form']) && $dataray['form'] instanceof \System\Form) { $this->form = $dataray['form']; unset($dataray['form']); } else { throw new \System\Error\Argument("You must pass instance of 'System\\Form' into element attributes."); } parent::__construct($dataray); }
/** * Public constructor compatible with attr model * @return $this */ public function __construct(array $dataray = array()) { $this::$instance_count++; return parent::__construct($dataray); }