protected function _layoutPermissions()
    {
        $components = array();
        foreach ($this->_state->getItem()->components as $component) {
            $permissions = array();

            if (!$component->isAssignable()) {
                continue;
            }

            if (!count($component->getPermissions())) {
                continue;
            }

            foreach ($component->getPermissions() as $identifier => $actions) {
                if (strpos($identifier, '.') === false) {
                    $name = $identifier;
                    $identifier = clone $component->getIdentifier();
                    $identifier->path = array('domain','entity');
                    $identifier->name = $name;
                }

                $identifier = $this->getIdentifier($identifier);

                foreach ($actions as $action) {
                    $label = AnTranslator::_(strtoupper('COM-'.$identifier->package.'-PERMISSION'.'-'.$identifier->name.'-'.$action));
                    $name = 'com_'.$identifier->package.':'.$identifier->name.':'.$action;
                    $permissions[] = new AnConfig(array('label' => $label, 'name' => $name));
                }
            }

            $component->permissions = $permissions;
            $components[] = $component;
        }

        $this->components = $components;
    }
protected function _layoutPermissions()
    {
        $components = array();
        foreach ($this->_state->getItem()->components as $component) {
            $permissions = array();

            if (!$component->isAssignable()) {
                continue;
            }

            if (!count($component->getPermissions())) {
                continue;
            }

            foreach ($component->getPermissions() as $identifier => $actions) {
                if (strpos($identifier, '.') === false) {
                    $name = $identifier;
                    $identifier = clone $component->getIdentifier();
                    $identifier->path = array('domain','entity');
                    $identifier->name = $name;
                }

                $identifier = $this->getIdentifier($identifier);

                foreach ($actions as $action) {
                    $label = AnTranslator::_(strtoupper('COM-'.$identifier->package.'-PERMISSION'.'-'.$identifier->name.'-'.$action));
                    $name = 'com_'.$identifier->package.':'.$identifier->name.':'.$action;
                    $permissions[] = new AnConfig(array('label' => $label, 'name' => $name));
                }
            }

            $component->permissions = $permissions;
            $components[] = $component;
        }

        $this->components = $components;
    }
protected function _layoutPermissions ( ) { $ components = array ( ) ; foreach ( $ this -> _state -> getItem ( ) -> components as $ component ) { $ permissions = array ( ) ; if ( ! $ component -> isAssignable ( ) ) { continue ; } if ( ! count ( $ component -> getPermissions ( ) ) ) { continue ; } foreach ( $ component -> getPermissions ( ) as $ identifier => $ actions ) { if ( strpos ( $ identifier , '.' ) === false ) { $ name = $ identifier ; $ identifier = clone $ component -> getIdentifier ( ) ; $ identifier -> path = array ( 'domain' , 'entity' ) ; $ identifier -> name = $ name ; } $ identifier = $ this -> getIdentifier ( $ identifier ) ; foreach ( $ actions as $ action ) { $ label = AnTranslator :: _ ( strtoupper ( 'COM-' . $ identifier -> package . '-PERMISSION' . '-' . $ identifier -> name . '-' . $ action ) ) ; $ name = 'com_' . $ identifier -> package . ':' . $ identifier -> name . ':' . $ action ; $ permissions [ ] = new AnConfig ( array ( 'label' => $ label , 'name' => $ name ) ) ; } } $ component -> permissions = $ permissions ; $ components [ ] = $ component ; } $ this -> components = $ components ; }
Layout Privacy.
Layout Privacy .