public function getForm($params = []) { $formdata = $this->formdata ?: $this->getData(); $force = $this->force_form_data_to_var ? $formdata : []; $data = array_merge(['formdata' => $formdata, 'error' => $this->errors, 'action' => $this->action, 'success' => ($msgs = $this->controller->flash->get($this->getName() . 'success')) ? implode('', $msgs) : false, 'avisos' => ($msgs = $this->controller->flash->get('avisos')) ? implode('', $msgs) : false], $this->messages, $params, $force); return $this->controller->render($this->view, $data, false); }
public function init() { $this->setCtrl('user'); parent::init(); /** * this tool require write permissions */ if (2 > $this->ctrlLv) { $this->flashMessenger()->addMessage("Not allowed"); // $this->flashMessenger()->addMessage("許可されていません。"); return $this->redirect()->toRoute('app', array('controller' => 'failed', 'action' => 'forbidden')); } }
public function __construct(Application $app) { parent::__construct($app); $this->notesService = $app['notes.service']; }
/** * Called for routes of type class:method. * Routes of type class::method are called statically. */ public function __construct($container) { parent::__construct($container); }