ez.no / exponential / documentation / reference / data fetching / content / can_instantiate_class_list
fetch( 'content', 'can_instantiate_class_list', hash( [ 'group_id', group_id ],
[ 'parent_node', parent_node ] )
| Name | Type | Description | Required |
|---|---|---|---|
| group_id | integer | Class group to fetch classes of. | No. |
| parent_node | object | Content node to get allowed class initiation from. | No. |
Array containing classes.
This function fetches a list of classes that the current user is allowed to create objects from. If no parameters are given, the class list will be generated based on the current node, and all class sections. The function returns an array of classes.
Example 1
{section loop=fetch( 'content', 'can_instantiate_class_list' )} {$:item.name|wash} {/section}
Outputs the name of all classes the current user is allowed to create in the current node.
Example 2
{section loop=fetch( 'content', 'can_instantiate_class_list', hash( 'group_id', 1 ) )} {$:item.name|wash}<br /> {/section}
Outputs the name of all content classes the current user is allowed to create in the current node.
Comments