kernel/classes/ezcontentobjecttreenode.php
protected function hasCurrentSubtreeLimitation( array $policy )
    {
        // No Subtree nor Node limitation, so we consider that it is potentially OK to create content under current subtree
        if ( !isset( $policy['Subtree'] ) && !isset( $policy['Node'] ) )
        {
            return true;
        }

        // First check subtree limitations
        if ( isset( $policy['Subtree'] ) )
        {
            foreach ( $policy['Subtree'] as $subtreeString )
            {
                if ( strpos( $this->attribute( 'path_string' ), $subtreeString ) !== false )
                {
                    return true;
                }
            }
        }

        // Then check node limitations
        if ( isset( $policy['Node'] ) )
        {
            foreach ( $policy['Node'] as $subtreeString )
            {
                if ( strpos( $this->attribute( 'path_string' ), $subtreeString ) !== false )
                {
                    return true;
                }
            }
        }

        return false;
    }
protected function hasCurrentSubtreeLimitation( array $policy )
    {
        // No Subtree nor Node limitation, so we consider that it is potentially OK to create content under current subtree
        if ( !isset( $policy['Subtree'] ) && !isset( $policy['Node'] ) )
        {
            return true;
        }

        // First check subtree limitations
        if ( isset( $policy['Subtree'] ) )
        {
            foreach ( $policy['Subtree'] as $subtreeString )
            {
                if ( strpos( $this->attribute( 'path_string' ), $subtreeString ) !== false )
                {
                    return true;
                }
            }
        }

        // Then check node limitations
        if ( isset( $policy['Node'] ) )
        {
            foreach ( $policy['Node'] as $subtreeString )
            {
                if ( strpos( $this->attribute( 'path_string' ), $subtreeString ) !== false )
                {
                    return true;
                }
            }
        }

        return false;
    }
protected function hasCurrentSubtreeLimitation ( array $ policy ) { // No Subtree nor Node limitation, so we consider that it is potentially OK to create content under current subtree if ( ! isset ( $ policy [ 'Subtree' ] ) && ! isset ( $ policy [ 'Node' ] ) ) { return true ; } // First check subtree limitations if ( isset ( $ policy [ 'Subtree' ] ) ) { foreach ( $ policy [ 'Subtree' ] as $ subtreeString ) { if ( strpos ( $ this -> attribute ( 'path_string' ) , $ subtreeString ) !== false ) { return true ; } } } // Then check node limitations if ( isset ( $ policy [ 'Node' ] ) ) { foreach ( $ policy [ 'Node' ] as $ subtreeString ) { if ( strpos ( $ this -> attribute ( 'path_string' ) , $ subtreeString ) !== false ) { return true ; } } } return false ; }
Checks if provided policy array has a limitation on current subtree
@param array $policy
@return bool
Checks if provided policy array has a limitation on current subtree