Forums / Extensions / eZ Flow / Howto filter out hidden nodes in ezflow

"Please Note:
  • At the specific request of Ibexa we are changing this projects name to "Exponential" or "Exponential (CMS)" effective as of August, 11th 2025.
  • This project is not associated with the original eZ Publish software or its original developer, eZ Systems or Ibexa".

Howto filter out hidden nodes in ezflow

Author Message

Georg Schröder

Tuesday 19 May 2009 6:01:47 am

Hello,
can anyone tell me how to filter out hidden nodes in the fetch-function of ezFlow?
Obviously the function

eZContentObjectTreeNode::subTreeByNodeID( $subTreeParameters, $nodeID )

ignores, if a node is visible or not.

Here is the complete code:

----------------------------------------------------------------------------

class fetchtopnews extends eZFlowFetchInterface
{
function fetch( $parameters, $publishedAfter, $publishedBeforeOrAt )
{
if ( isset( $parameters['Source'] ) )
{
$nodeID = $parameters['Source'];
$node = eZContentObjectTreeNode::fetch( $nodeID, false, false ); // not as an object
}
else
{
$nodeID = 0;
}

$subTreeParameters = array();
$subTreeParameters['AsObject'] = false;
$subTreeParameters['SortBy'] = array( 'published', false );
$subTreeParameters['Limit'] = isset( $parameters['Limit'] ) ? $parameters['Limit']:false;
$subTreeParameters['Depth'] = isset( $parameters['Depth'] ) ? $parameters['Depth']:false;

if ( isset( $parameters['Class'] ) )
{
$subTreeParameters['ClassFilterType'] = 'include';
$subTreeParameters['ClassFilterArray'] = explode( ';', $parameters['Class'] );
}

$subTreeParameters['AttributeFilter'] = array( array('article/top_news', '=', 1 ) );

$result = eZContentObjectTreeNode::subTreeByNodeID( $subTreeParameters, $nodeID );
$fetchResult = array();

foreach( $result as $item )
{
$fetchResult[] = array( 'object_id' => $item['contentobject_id'],
'node_id' => $item['node_id'],
'ts_publication' => $item['published'] );
}
// shuffle($fetchResult);
return $fetchResult;
}
}
----------------------------------------------------------------------------
Please help!

Thanks a lot!

Georg

Bin LIU

Tuesday 19 May 2009 6:27:45 am

 $params["IgnoreVisibility"] = true


$list = eZContentObjectTreeNode::subTreeByNodeID( $params, 2222222 )

:-;

=== Lagardère Active ===

Fetch random
http://projects.ez.no/la_fetch_random
LA Static Cache
http://projects.ez.no/lastaticcache
LA Bookmarks (jquery)
http://projects.ez.no/labookmark
LA Calendar (jquery)
http://projects.ez.no/lacalendar

My site ez
http://lingping.info