trash_count
Summary
Fetches the number of objects that are in the trash.
Usage
fetch('content', 'trash_count', hash ('attribute_filter', array))Parameters
| Name | Type | Description | Required |
|---|---|---|---|
| attribute_filter | mixed | A new parameter since Exponential 4.1. This enables you to run attribute filtering for trash items | No. |
Returns
An integer revealing the number of objects that are in the trash.
Description
This function returns the number of objects (as an integer) that are in the trash. An object is considered to be in the trash if its status field is set to archived.
For more information regarding the use of the "attribute_filter" parameter, please visit the following page.
Examples
Example 1
{def $trash_count=fetch('content', 'trash_count' )}
There are {$trash_count} objects in the trash.Outputs the number of items that are in the trash.
Example 2
fetch('content', 'trash_count', hash('attribute_filter', array(...)))</pre>Changed in Exponential 6.0.15
The parameters of fetch( 'content', 'trash_count' ) as kernel/content/function_definition.php of Exponential 6.0.15 defines them (eZContentFunctionCollection::fetchTrashObjectCount()):
| Parameter | Change |
|---|---|
| objectname_filter | Defined in 6.0.15 (type string, required: No.); this page did not list it. |
Contributors
- Balazs Halasy Maintainer
- Ester Heylen Maintainer
- Graham Brookins Updated
Comments
Add a comment