kernel/private/api/content/content.php
public static function fromNode( eZContentObjectTreeNode $node, $checkAccess = true )
    {
        $object = $node->object();
        if ( $checkAccess && !$object->attribute( 'can_read' ) )
        {
            throw new ezpContentAccessDeniedException( $object->attribute( 'id' ) );
        }

        $content = new ezpContent();
        $content->fields = ezpContentFieldSet::fromContentObject( $object );
        $content->object = $object;
        $content->locations = ezpContentLocation::fromNode( $node );

        return $content;
    }
public static function fromNode( eZContentObjectTreeNode $node, $checkAccess = true )
    {
        $object = $node->object();
        if ( $checkAccess && !$object->attribute( 'can_read' ) )
        {
            throw new ezpContentAccessDeniedException( $object->attribute( 'id' ) );
        }

        $content = new ezpContent();
        $content->fields = ezpContentFieldSet::fromContentObject( $object );
        $content->object = $object;
        $content->locations = ezpContentLocation::fromNode( $node );

        return $content;
    }
public static function fromNode ( eZContentObjectTreeNode $ node , $ checkAccess = true ) { $ object = $ node -> object ( ) ; if ( $ checkAccess && ! $ object -> attribute ( 'can_read' ) ) { throw new ezpContentAccessDeniedException ( $ object -> attribute ( 'id' ) ) ; } $ content = new ezpContent ( ) ; $ content -> fields = ezpContentFieldSet :: fromContentObject ( $ object ) ; $ content -> object = $ object ; $ content -> locations = ezpContentLocation :: fromNode ( $ node ) ; return $ content ; }
Instanciates an ezpContent from an eZContentObjectTreeNode
@param eZContentObjectTreeNode $node
@return ezpContent
Instanciates an ezpContent from an eZContentObjectTreeNode