protected static function _getDefaultPermissions($component)
    {
        $identifiers = $component->getEntityIdentifiers('ComMediumDomainEntityMedium');

        $permissions = array();

        foreach ($identifiers as $identifier) {
            try {
                $repos = AnDomain::getRepository($identifier);

                if ($repos->entityInherits('ComMediumDomainEntityMedium')) {
                    $actions = array('add');
                    //if commentable then allow to set
                    //comment permissions
                    if ($repos->hasBehavior('commentable')) {
                        $actions[] = 'addcomment';
                    }

                    $permissions[(string) $identifier] = $actions;
                }
            } catch (Exception $e) {
            }
        }

        return $permissions;
    }
protected static function _getDefaultPermissions($component)
    {
        $identifiers = $component->getEntityIdentifiers('ComMediumDomainEntityMedium');

        $permissions = array();

        foreach ($identifiers as $identifier) {
            try {
                $repos = AnDomain::getRepository($identifier);

                if ($repos->entityInherits('ComMediumDomainEntityMedium')) {
                    $actions = array('add');
                    //if commentable then allow to set
                    //comment permissions
                    if ($repos->hasBehavior('commentable')) {
                        $actions[] = 'addcomment';
                    }

                    $permissions[(string) $identifier] = $actions;
                }
            } catch (Exception $e) {
            }
        }

        return $permissions;
    }
protected static function _getDefaultPermissions ( $ component ) { $ identifiers = $ component -> getEntityIdentifiers ( 'ComMediumDomainEntityMedium' ) ; $ permissions = array ( ) ; foreach ( $ identifiers as $ identifier ) { try { $ repos = AnDomain :: getRepository ( $ identifier ) ; if ( $ repos -> entityInherits ( 'ComMediumDomainEntityMedium' ) ) { $ actions = array ( 'add' ) ; //if commentable then allow to set //comment permissions if ( $ repos -> hasBehavior ( 'commentable' ) ) { $ actions [ ] = 'addcomment' ; } $ permissions [ ( string ) $ identifier ] = $ actions ; } } catch ( Exception $ e ) { } } return $ permissions ; }
Return an array of permissions by using the medium objects.

@return array()
Return an array of permissions by using the medium objects .