Example #1
0
 public function editAction()
 {
     $view = new ViewModel();
     $request = $this->getRequest();
     $url = $request->getUri();
     $view->url = $url;
     $id = substr($url, strripos($url, '/') + 1);
     $adapter = ServiceConfigHelper::getAdapter($this);
     $form = new CmsDetailForm($adapter);
     $form->get('submit')->setValue('Save');
     $view->form = $form;
     $view->count = $this->countCmsItemsOfFolder($id);
     $view->items = $this->getFullCmsItemOfFolder($id);
     $array = [];
     if (0 <= $this->countCmsItemsOfFolder($id)) {
         $this->createCmsItem($request);
     } else {
         throw new \Exception("Can't create/edit this cms item");
     }
     return $view;
 }
Example #2
0
 public static function getAclServiceConfig($owner)
 {
     return ServiceConfigHelper::getServiceConfig($owner, 'Bob\\Model\\DataObject\\AclUser', 'acl_user', 'Bob\\Model\\DataMapper\\AclUserMapper');
 }