public function getDefaultAdminRole()
 {
     /**
      * check if an admin role has been defined in the config
      * if it has, use it for search
      * else, use the default 'administrator'
      */
     $config = $this->getServiceManager()->get('config');
     $adminRole = $config['zfmuscle']['default_admin_role'];
     $filters['name'] = array('strategy' => 'Equals', 'value' => $adminRole);
     $selection = $this->provider->selectAll($filters);
     $result = $this->provider->query($selection)->getResult();
     if (count($result)) {
         foreach ($result as $entity) {
             if ($entity->getId()) {
                 return $entity->getId();
             }
         }
     }
     return false;
 }
Example #2
0
 public function delete($id)
 {
     return $this->provider->delete($id);
 }