Snippets for eZ publish 3: Hiding or unhiding subtrees

Example code

if ( $node->attribute( 'can_hide' ) )
{
    if ( $node->attribute( 'is_hidden' ) )
    {
        eZContentObjectTreeNode::unhideSubTree( $node );
    }
    else
    {
        eZContentObjectTreeNode::hideSubTree( $node );
    }
}