/** * Create a new post * * @todo * * @return [type] [description] */ public function newAction() { $editor = new Editor(); $editor->init(); $this->view->form = new PostsForm(); $this->tag->setTitle('Adding post'); $this->view->pick($this->router->getControllerName() . '/item'); }
/** * This initializes the timezone in each request */ public function initialize() { parent::initialize(); $editor = new Editor(); $editor->init(); }
public function editAction($id) { if (!($object = Posts::findFirstById($id))) { $this->flashSession->error(t('Posts doesn\'t exist.')); return $this->currentRedirect(); } $editor = new Editor(); $editor->init(); $this->tag->setTitle(t('Edit posts')); $this->view->form = new PostsForm($object); $this->view->object = $object; $this->addAssetsSelect(); return $this->view->pick($this->router->getControllerName() . '/item'); }