FOF30\View\DataView\Raw::onBeforeAdd PHP Méthode

onBeforeAdd() protected méthode

Executes before rendering the page for the add task.
protected onBeforeAdd ( )
    protected function onBeforeAdd()
    {
        /** @var DataModel $model */
        $model = $this->getModel();
        $this->item = $model->reset(true, true);
    }

Usage Example

Exemple #1
0
 /**
  * Executes before rendering the page for the Add task.
  */
 protected function onBeforeAdd()
 {
     // Hide main menu
     \JFactory::getApplication()->input->set('hidemainmenu', true);
     parent::onBeforeAdd();
 }