/** * Construct a new scaffold index view * @param boolean $isLocalized Flag to set whether the data is localized * @param zibo\library\html\table\Table $table Table with the model data * @param string $title Title for the page * @param array $actions Array with the URL for the action as key and the label as value * @return null */ public function __construct(ModelMeta $meta, Table $table, $title, array $actions = null) { parent::__construct(self::TEMPLATE); $this->isLocalized = $meta->isLocalized(); $this->set('table', $table); $this->set('title', $title); $this->set('actions', $actions); $this->addJavascript(BaseView::SCRIPT_TABLE); }
/** * Constructs a new scaffold form view * @param zibo\library\orm\model\meta\ModelMeta $meta Meta of the model * @param zibo\library\html\form\Form $form Form of the data * @param string $title Title for the view * @param mixed $data Data object set to the form * @param string $localizeAction URL to change the content locale * @param string $template Provide to override the default template * @return null */ public function __construct(ModelMeta $meta, Form $form, $title, $data = null, $localizeAction = null, $template = null) { if (!$template) { $template = self::TEMPLATE; } parent::__construct($template); $this->isLocalized = $meta->isLocalized(); $this->set('title', $title); $this->set('data', $data); $this->setForm($form); $this->setLocalizeSubview($meta, $data, $localizeAction); $this->setLogSubview($meta, $data); }