In this case this is the base class for the edit action
public function execute() { parent::execute(); try { $id = Uuid::fromString($this->getParameter('id', 'string')); $teamMember = $this->get('team_repository')->find($id); } catch (\Exception $e) { return $this->redirect(Model::createURLForAction('Index') . '&error=non-existing'); } $form = new TeamType('edit', $teamMember); if ($form->handle()) { $teamMember = $form->getData(); $this->get('team_repository')->save($teamMember); return $this->redirect(Model::createURLForAction('Index') . '&report=edited' . '&highlight=row-' . $teamMember->getId()); } // assign the detail url to the template if available $url = Model::getURLForBlock($this->URL->getModule(), 'Detail'); if (Model::getURL(404) != $url) { $this->tpl->assign('detailURL', SITE_URL . $url); } $form->parse($this->tpl); $this->tpl->assign('teamMember', $teamMember->toArray()); $this->parse(); $this->display(); }
/** * Execute the action */ public function execute() { parent::execute(); $this->loadData(); $this->parse(); $this->display(); }
/** * Parse the form */ protected function parse() { parent::parse(); // assign the data $this->tpl->assign('item', $this->record); $this->tpl->assign('fieldLanguages', $this->fieldLanguages); }
/** * Parse the form */ protected function parse() { parent::parse(); $this->tpl->assign('item', $this->record); // delete allowed? $this->tpl->assign('showBlogDeleteCategory', BackendBlogModel::deleteCategoryAllowed($this->id) && BackendModel::createURLForAction('DeleteCategory')); }
/** * Parse the form */ protected function parse() { parent::parse(); // assign the data $this->tpl->assign('item', $this->record); $this->tpl->assign('showFaqDeleteCategory', BackendFaqModel::deleteCategoryAllowed($this->id) && BackendAuthentication::isAllowedAction('DeleteCategory')); }
/** * Parse the form */ protected function parse() { parent::parse(); $this->tpl->assign('product', $this->product); $this->tpl->assign('id', $this->id); $this->tpl->assign('item', $this->image); }
/** * Parse the form */ protected function parse() { parent::parse(); // parse additional variables $this->tpl->assign('commentsRSSURL', SITE_URL . BackendModel::getURLForBlock($this->URL->getModule(), 'comments_rss')); $this->tpl->assign('isGod', $this->isGod); }
/** * Parse the form */ protected function parse() { parent::parse(); // assign id, term $this->tpl->assign('id', $this->record['id']); $this->tpl->assign('term', $this->record['term']); }
/** * Parse the form * * @return void */ protected function parse() { parent::parse(); $this->tpl->assign('id', $this->record['id']); $this->tpl->assign('title', $this->record['title']); // delete allowed? $this->tpl->assign('showSlideshowDeleteCategory', BackendSlideshowModel::deleteCategoryAllowed($this->id)); }
/** * Parse the form */ protected function parse() { parent::parse(); // parse form $this->frm->parse($this->tpl); // assign iteration $this->tpl->assign(array('modules' => $this->modules)); }
/** * Execute the action */ public function execute() { parent::execute(); $this->loadForm(); $this->validateForm(); $this->parse(); $this->display(); }
/** * Parse the form */ protected function parse() { parent::parse(); // assign the active record and additional variables $this->tpl->assign('mailing', $this->record); $this->tpl->assign('template', $this->template); // parse template content $this->parseTemplateContent(); }
/** * Execute the action */ public function execute() { parent::execute(); set_time_limit(0); $this->fs = new Filesystem(); $this->loadForm(); $this->validateForm(); $this->parse(); $this->display(); }
/** * Execute the action */ public function execute() { parent::execute(); $this->groupId = \SpoonFilter::getGetValue('group_id', null, 0, 'int'); $this->downloadExampleFile(); $this->loadForm(); $this->validateForm(); $this->parse(); $this->display(); }
/** * Parse the form */ protected function parse() { parent::parse(); // assign the data $this->tpl->assign('item', $this->record); // is brand allowed to be deleted? if (BackendCatalogModel::isBrandAllowedToBeDeleted($this->id)) { $this->tpl->assign('showDelete', true); } }
/** * Parse the form * * @return void */ protected function parse() { // call parent parent::parse(); // assign the category $this->tpl->assign('category', $this->record); // can the category be deleted? if (BackendGalleriaModel::deleteCategoryAllowed($this->id)) { $this->tpl->assign('showDelete', true); } }
/** * Parse the page */ protected function parse() { parent::parse(); $this->tpl->assign('item', $this->record); $this->tpl->assign('iframe', BackendModel::createURLForAction('preview') . "&id=" . $this->id); // get url $url = BackendModel::getURLForBlock($this->URL->getModule(), 'detail'); $url404 = BackendModel::getURL(404); if ($url404 != $url) { $this->tpl->assign('detailURL', SITE_URL . $url); } }
/** * Parse the form */ protected function parse() { parent::parse(); // assign the data $this->tpl->assign('item', $this->record); $this->tpl->assign('showFaqDeleteCategory', BackendFaqModel::deleteCategoryAllowed($this->id) && BackendAuthentication::isAllowedAction('DeleteCategory')); $url = BackendModel::getURLForBlock($this->URL->getModule(), 'Category'); $url404 = BackendModel::getURL(404); if ($url404 != $url) { $this->tpl->assign('detailURL', SITE_URL . $url); } }
/** * Parse the page */ protected function parse() { parent::parse(); $this->header->addJS('edit.js'); $this->tpl->assign('item', $this->record); // get url $url = BackendModel::getURLForBlock($this->URL->getModule(), 'Group'); $url404 = BackendModel::getURL(404); if ($url404 != $url) { $this->tpl->assign('detailURL', SITE_URL . $url); } }
/** * Parse the page */ protected function parse() { parent::parse(); // Get url $url = Model::getURLForBlock($this->URL->getModule(), 'Detail'); $url404 = Model::getURL(404); // Parse additional variables if ($url404 != $url) { $this->tpl->assign('detailURL', SITE_URL . $url); } $this->tpl->assign('item', $this->record); }
/** * Parse the form */ protected function parse() { parent::parse(); // prevent XSS $filter = \SpoonFilter::arrayMapRecursive('htmlspecialchars', $this->filter); // parse filter $this->tpl->assign($filter); $this->tpl->assign('filterQuery', $this->filterQuery); // assign id, name $this->tpl->assign('name', $this->record['name']); $this->tpl->assign('id', $this->record['id']); }
/** * Parse the form */ protected function parse() { parent::parse(); // get url $url = BackendModel::getURLForBlock($this->URL->getModule(), 'detail'); $url404 = BackendModel::getURL(404); if ($url404 != $url) { $this->tpl->assign('detailURL', SITE_URL . $url); } // assign the active record and additional variables $this->tpl->assign('item', $this->record); $this->tpl->assign('feedback', $this->feedback); }
/** * Execute the action */ public function execute() { $this->id = $this->getParameter('id', 'int'); // does the item exist if ($this->id !== null && BackendAgendaModel::existsSubscription($this->id)) { parent::execute(); $this->getData(); $this->loadForm(); $this->validateForm(); $this->parse(); $this->display(); } else { $this->redirect(BackendModel::createURLForAction('index') . '&error=non-existing'); } }
/** * Execute the action */ public function execute() { $this->id = $this->getParameter('id', 'int'); // does the item exist if ($this->id !== null && BackendBlogModel::existsComment($this->id)) { parent::execute(); $this->getData(); $this->loadForm(); $this->validateForm(); $this->parse(); $this->display(); } else { // no item found, throw an exception, because somebody is f*****g with our URL $this->redirect(BackendModel::createURLForAction('Index') . '&error=non-existing'); } }
/** * Parse the form */ protected function parse() { parent::parse(); // assign the active record and additional variables $this->tpl->assign('address', $this->record); // assign the group record $this->tpl->assign('group', $this->group); }
/** * Parse the data */ protected function parse() { parent::parse(); $this->tpl->assign('godUser', BackendAuthentication::getUser()->isGod()); }
/** * Parse the form */ protected function parse() { $this->parseFields(); parent::parse(); $this->tpl->assign('id', $this->record['id']); $this->tpl->assign('name', $this->record['name']); // parse error messages $this->parseErrorMessages(); }
/** * Parse the form * * @return void */ protected function parse() { //--Add javascript file $this->header->addJS('Jquery.uploadify.min.js', null, false); $this->header->addJS('Edit.js', null, false); $this->header->addCSS('Uploadify.css'); // call parent parent::parse(); // assign the category $this->tpl->assign('album', $this->record); $this->tpl->assign('images', $this->images); if ($this->frmAddImage) { $this->frmAddImage->parse($this->tpl); } if ($this->frmDeleteImage) { $this->frmDeleteImage->parse($this->tpl); } //--Add data to Javascript $this->header->addJsData("Galleria", "id", $this->id); // can the category be deleted? if (BackendGalleriaModel::deleteAlbumAllowed($this->id)) { $this->tpl->assign('showDelete', true); } // get url $url = BackendModel::getURLForBlock($this->URL->getModule(), 'group'); $url404 = BackendModel::getURL(404); if ($url404 != $url) { $this->tpl->assign('detailURL', SITE_URL . $url); } }
/** * Parse the form */ protected function parse() { parent::parse(); $this->tpl->assign('dataGridUsers', $this->dataGridUsers->getNumResults() != 0 ? $this->dataGridUsers->getContent() : false); $this->tpl->assign('item', $this->record); $this->tpl->assign('groupName', $this->record['name']); // only allow deletion of empty groups $this->tpl->assign('showGroupsDelete', $this->dataGridUsers->getNumResults() == 0 && BackendAuthentication::isAllowedAction('Delete')); }
/** * Parse the page */ protected function parse() { parent::parse(); $this->tpl->assign('item', $this->record); }