object_count_by_user_id
Summary
Fetches the number of objects (of a class) created by a user.
Usage
fetch( 'content', 'object_count_by_user_id',
hash( 'class_id', class_id,
'user_id', user_id ) )Parameters
| Name | Type | Description | Required |
|---|---|---|---|
| class_id | integer | The ID number of the target class. | Yes. |
| user_id | integer | The ID number of the user (object ID). | Yes. |
Returns
The number of objects (as an integer).
Description
This function counts the number of objects (of a certain type) that were created by a user. Both the type of the object (the class) and the user must be specified. The function returns an integer revealing the number of objects that were found.
Examples
{def count=fetch( 'content', 'object_count_by_user_id', hash( 'class_id', 13, 'user_id', 14 ) )}
{$count}
{undef $count}Outputs the number of objects (of class number 13) that have been created by user number 14.
Changed in Exponential 6.0.15
The parameters of fetch( 'content', 'object_count_by_user_id' ) as kernel/content/function_definition.php of Exponential 6.0.15 defines them (eZContentFunctionCollection::fetchObjectCountByUserID()):
| Parameter | Change |
|---|---|
| status | Defined in 6.0.15 (type integer, required: No., default false); this page did not list it. |
Contributors
- Balazs Halasy Maintainer
- Svitlana Shatokhina Maintainer
- Graham Brookins Updated
Comments
Add a comment