protected function BeforeInit() { if (!self::Guard()->Allow(BackendAction::Read(), $this)) { //TODO: message Response::Redirect(BackendRouter::ModuleUrl(new Overview())); return false; } return parent::BeforeInit(); }
protected function CreateAfterUrl() { $args = array('navigation' => $this->navigation->GetID()); $args['previous'] = $this->item->GetID(); $parent = $this->item->GetParent(); if ($parent) { $args['parent'] = $parent->GetID(); } return BackendRouter::ModuleUrl(new NavigationItemForm(), $args); }
/** * Saves the group and redirects to the list */ protected function OnSuccess() { $action = $this->group->Exists() ? Action::Update() : Action::Create(); $this->group->SetName($this->Value('Name')); $this->group->SetCreateContainers((bool) $this->Value('CreateContainers')); $this->group->SetCreateLayouts((bool) $this->Value('CreateLayouts')); $this->group->SetCreateContainers((bool) $this->Value('CreateContainers')); $this->group->Save(); $logger = new Logger(self::Guard()->GetUser()); $logger->ReportUserGroupAction($this->group, $action); $target = BackendRouter::ModuleUrl(new UsergroupList()); Response::Redirect($target); }
/** * Gets the content tree url * @param Area $area * @return string Returns the page content tree url */ protected function AreaUrl(Area $area) { $params = array(); $params['page'] = $this->page->GetID(); $params['area'] = $area->GetID(); return BackendRouter::ModuleUrl(new PageContentTree(), $params); }
private function ContainerBackLink($selected) { $params = array(); $params['container'] = $this->Container()->GetID(); if ($selected) { $params['selected'] = $selected; } return BackendRouter::ModuleUrl(new ContainerContentTree(), $params); }
/** * The json url for the ajax "tree" * @return string */ protected function JsonUrl() { return BackendRouter::AjaxUrl(new JsonAreaList()); }
protected function BackLink() { return BackendRouter::ModuleUrl(new LayoutList()); }
/** * Saves the area */ protected function OnSuccess() { $action = $this->user->Exists() ? Action::Update() : Action::Create(); $this->user->SetName($this->Value('Name')); $this->user->SetEMail($this->Value('EMail')); $this->user->SetLanguage(new Language($this->Value('Language'))); if ($this->CanChangeIsAdmin()) { $this->user->SetIsAdmin((bool) $this->Value('IsAdmin')); } $this->SavePassword(); $this->user->Save(); $logger = new Logger(self::Guard()->GetUser()); $logger->ReportUserAction($this->user, $action); Response::Redirect(BackendRouter::ModuleUrl(new UserList())); }
/** * The url for creating content after the current item * @return type */ protected final function CreateAfterUrl() { $args = $this->EditParams(); $args['previous'] = $this->item->GetID(); return BackendRouter::ModuleUrl(new ModuleForm(), $args); }
protected function SettingsFormLink() { return BackendRouter::ModuleUrl(new SettingsForm()); }
/** * The backlink * @return string */ protected function BackLink() { $module = new NavigationTree(); $params = array('navigation' => $this->navi->GetID()); return BackendRouter::ModuleUrl($module, $params); }
/** * The link for the back button * @return string Returns the url to the member list */ protected function BackLink() { return BackendRouter::ModuleUrl(new MembergroupList()); }
protected function OpenUrl() { $args = array('pageOnly' => '1'); if (count($this->disabledPageIDs) > 0) { $args['disabled'] = $this->disabledPageIDs; } if ($this->site) { $args['site'] = $this->site->GetID(); } return BackendRouter::AjaxUrl(new AjaxSelectPage(), $args); }
protected function OnSuccess() { $postedGroupIDs = $this->PostedGroupIDs(); foreach ($this->currentGroups as $currentGroup) { if (!in_array($currentGroup->GetID(), $postedGroupIDs)) { $this->DeleteGroupAssignment($currentGroup); } } foreach ($postedGroupIDs as $postedGroupID) { if (!$this->HasGroup(new Usergroup($postedGroupID))) { $uug = new UserUsergroup(); $uug->SetUser($this->user); $uug->SetUserGroup(new Usergroup($postedGroupID)); $uug->Save(); } } Response::Redirect(BackendRouter::ModuleUrl(new UserList())); }
protected function OnSuccess() { $page = $this->Value('page'); if (!$page) { $this->UnsetPage(); $this->CloseModal(); } else { if ($this->pageOnly) { $objPage = Page::Schema()->ByID($page); $page = $this->SetJSFieldValue('#' . $this->prefix . 'Page', $page); $this->SetJSHtml('#' . $this->prefix . 'Name', $objPage->GetName()); $this->CloseModal(); return; } } $params = array(); $params['prefix'] = $this->prefix; $params['page'] = $this->Value('page'); $params['params'] = Request::GetData('params'); $params['fragment'] = Request::GetData('fragment'); $this->RedirectModal(BackendRouter::AjaxUrl(new AjaxPageParams(), $params)); }
private function DoRedirect(ContentForm $contentForm) { $params = Request::GetArray(); Response::Redirect(BackendRouter::ModuleUrl($contentForm, $params)); }
/** * The link for the back button * @return string Returns the url to the page tree */ protected function BackLink() { $params = array('site' => $this->site->GetID()); if ($this->page->Exists()) { $params['selected'] = $this->page->GetID(); } else { if ($this->previous) { $params['selected'] = $this->previous->GetID(); } else { if ($this->parent) { $params['selected'] = $this->parent->GetID(); } } } return BackendRouter::ModuleUrl(new PageTree(), $params); }
/** * The link for the back button * @return string Returns the url to the container list */ protected function BackLink() { return BackendRouter::ModuleUrl(new ContainerList()); }
protected function TemplateFormUrl(Layout $layout) { return BackendRouter::ModuleUrl(new LayoutTemplateForm(), array('layout' => $layout->GetID())); }
protected function AfterSave() { $params = array('navigation' => $this->navi->GetID()); Response::Redirect(BackendRouter::ModuleUrl(new NavigationTree(), $params)); }
protected function OnSuccess() { $this->DeleteUnselected(); $bundles = $this->Bundles(); foreach ($bundles as $bundle) { if ($this->Value($bundle)) { $this->SaveLock($bundle); continue; } $modules = $this->Modules($bundle); foreach ($modules as $module) { if ($this->Value($this->FieldName($bundle, $module))) { $this->SaveLock($bundle, $module); } } } Response::Redirect(BackendRouter::ModuleUrl(new UsergroupList())); }
protected function BackLink() { return BackendRouter::ModuleUrl(new TemplateList()); }
protected function JsonUrl() { return BackendRouter::AjaxUrl(new JsonNavigationTree()); }
/** * The link for the back button * @return string Returns the url to the overview */ protected function BackLink() { return BackendRouter::ModuleUrl(new Overview()); }
/** * The link for the back button * @return string Returns the url to the page tree */ protected function BackLink() { $params = array('site' => $this->page->GetSite()->GetID()); $params['selected'] = $this->page->GetID(); return BackendRouter::ModuleUrl(new PageTree(), $params); }