public function updateNodeVisibility( $nodeID, $action )
    {
        $node = eZContentObjectTreeNode::fetch( $nodeID );
        eZContentOperationCollection::registerSearchObject( $node->attribute( 'contentobject_id' ) );

        $params = array(
            'Depth' => 1,
            'DepthOperator' => 'eq',
            'Limitation' => array(),
            'IgnoreVisibility' => true
        );

        if ( $node->subTreeCount( $params ) > 0 )
        {
            $pendingAction = new eZPendingActions(
                array(
                    'action' => 'index_subtree',
                    'created' => time(),
                    'param' => $nodeID
                )
            );

            $pendingAction->store();
        }
    }
public function updateNodeVisibility( $nodeID, $action )
    {
        $node = eZContentObjectTreeNode::fetch( $nodeID );
        eZContentOperationCollection::registerSearchObject( $node->attribute( 'contentobject_id' ) );

        $params = array(
            'Depth' => 1,
            'DepthOperator' => 'eq',
            'Limitation' => array(),
            'IgnoreVisibility' => true
        );

        if ( $node->subTreeCount( $params ) > 0 )
        {
            $pendingAction = new eZPendingActions(
                array(
                    'action' => 'index_subtree',
                    'created' => time(),
                    'param' => $nodeID
                )
            );

            $pendingAction->store();
        }
    }
public function updateNodeVisibility ( $ nodeID , $ action ) { $ node = eZContentObjectTreeNode :: fetch ( $ nodeID ) ; eZContentOperationCollection :: registerSearchObject ( $ node -> attribute ( 'contentobject_id' ) ) ; $ params = array ( 'Depth' => 1 , 'DepthOperator' => 'eq' , 'Limitation' => array ( ) , 'IgnoreVisibility' => true ) ; if ( $ node -> subTreeCount ( $ params ) > 0 ) { $ pendingAction = new eZPendingActions ( array ( 'action' => 'index_subtree' , 'created' => time ( ) , 'param' => $ nodeID ) ) ; $ pendingAction -> store ( ) ; } }
Update index when node's visibility is modified.

If the node has children, they will be also re-indexed, but this action is deferred to ezfindexsubtree cronjob.

@param int $nodeID
@param string $action
Update index when node s visibility is modified .