Beispiel #1
0
 public function view($ptID = false, $message = false)
 {
     $this->pagetype = PageType::getByID($ptID);
     if (!$this->pagetype) {
         $this->redirect('/dashboard/pages/types');
     }
     $cmp = new \Permissions($this->pagetype);
     if (!$cmp->canEditPageTypePermissions()) {
         throw new \Exception(t('You do not have access to edit this page type permissions.'));
     }
     switch ($message) {
         case 'updated':
             $this->set('success', t('Permissions updated successfully.'));
             break;
     }
     $this->set('defaultPage', $this->pagetype->getPageTypePageTemplateDefaultPageObject());
     $this->set('pagetype', $this->pagetype);
 }