Nicolas Pastorino
|
Friday 16 April 2010 12:50:40 am
Do you have any idea about the script location? (the script which get the pending objects)
Hello Fabien, The fetch function used is provided by the 'collaboration' module. This means the fetch function definition will be found in the module's directory, under kernel/collaboration, in a file called 'function_definition.php' (this is the standard structure, which you can obviously apply to your custom modules). The definition of the fetch function is as follows (eZ Publish 4.2) :
$FunctionList['item_list'] = array( 'name' => 'item_list',
'operation_types' => array( 'read' ),
'call_method' => array( 'class' => 'eZCollaborationFunctionCollection',
'method' => 'fetchItemList' ),
'parameter_type' => 'standard',
'parameters' => array( array( 'name' => 'sort_by',
'required' => false,
'default' => false ),
array( 'name' => 'offset',
'required' => false,
'default' => false ),
array( 'name' => 'limit',
'required' => false,
'default' => false ),
array( 'name' => 'status',
'required' => false,
'default' => false ),
array( 'name' => 'is_read',
'required' => false,
'default' => null ),
array( 'name' => 'is_active',
'required' => false,
'default' => null ),
array( 'name' => 'parent_group_id',
'required' => false,
'default' => null ) ) ); This tells you that the class involved is 'eZCollaborationFunctionCollection' and the method 'fetchItemList', found in the 'kernel/collaboration/ezcollaborationfunctioncollection.php' file. You mat want to have a look there! Cheers, and let us know how you are progressing,
--
Nicolas Pastorino
Director Community - eZ
Member of the Community Project Board
eZ Publish Community on twitter: http://twitter.com/ezcommunity
t : http://twitter.com/jeanvoye
G+ : http://plus.tl/jeanvoye
|
Fabien Audin
|
Monday 19 April 2010 1:49:54 am
Thank you very much Nicolas, For my first problem, I had to write this line : {def $latest_item_list=fetch("collaboration","item_list", hash("is_active",true(), "status", array(1)))} to get only objects with status = 1. My second problem is that this function get objects which are created by the current logged in user. But I want objects created by everyone. I'll have a look on files you told me. I'll reply when I have found. Thanks a lot
|