Пример #1
0
 private function getBundleClassMetadata()
 {
     $classes = array();
     foreach ($this->_application->getBundles() as $bundle) {
         $classes = array_merge($classes, $this->_getBundleSchema($bundle));
     }
     return $classes;
 }
Пример #2
0
 /**
  *
  */
 public function __construct(BBApplication $app)
 {
     if (empty($this->bundle)) {
         foreach ($app->getBundles() as $bundle) {
             if ($bundle instanceof ThemeCore) {
                 $this->bundle = $bundle;
             }
         }
     }
     parent::__construct($app);
 }
 private function addBundleRights($bundle_def, $aclProvider, $securityIdentity)
 {
     if (false === array_key_exists('resources', $bundle_def) || false === array_key_exists('actions', $bundle_def)) {
         return null;
     }
     $actions = $this->getActions($bundle_def['actions']);
     if (0 === count($actions)) {
         $this->writeln('Notice: none actions defined on bundle' . PHP_EOL);
         return array();
     }
     if (true === is_array($bundle_def['resources'])) {
         foreach ($bundle_def['resources'] as $bundle_name) {
             if (null !== ($bundle = $this->bbapp->getBundle($bundle_name))) {
                 $this->addObjectAcl($bundle, $aclProvider, $securityIdentity, $actions);
             }
         }
     } elseif ('all' === $bundle_def['resources']) {
         foreach ($this->bbapp->getBundles() as $bundle) {
             $this->addObjectAcl($bundle, $aclProvider, $securityIdentity, $actions);
         }
     }
 }