Caution: This documentation is for eZ Publish legacy, from version 3.x to 6.x.
For 5.x documentation covering Platform see eZ Documentation Center, for difference between legacy and Platform see 5.x Architecture overview.

roles

Summary

Fetches roles that have at least one policy limited to a certain section.

Usage

fetch( 'section', 'roles', hash( 'section_id', section_id ) )

Parameters

NameTypeDescriptionRequired
section_id integer The ID number of the target section. Yes.

Returns

An array (see below) or FALSE.

Description

This function returns a structure that contains information about roles which have at least one policy limited to a certain section. The function returns an array with two keys:

Name

Description

roles

Contains a list of roles with at least one policy limited to the given section.

limited_policies

Contains a 2D array (the role ID as the first key) of the limited policies.

Examples

Example 1

{def $roles_array=fetch( 'section', 'roles', hash( 'section_id', 13 ) )
     $roles=$roles_array.roles
     $policies=$roles_array.limited_policies}
 
{foreach $roles as $role}
    {$role.name}:
    {foreach $limited_policies[$role.id] as $policy}
        {$policy.module_name}/{$policy.function_name}
        {delimiter}, {/delimiter}
    {/foreach}
    <br />
{/foreach}

Outputs information about roles that have limitations associated with section number 13.

Balazs Halasy (04/10/2004 1:50 pm)

Balazs Halasy (29/04/2005 9:12 am)


Comments

There are no comments.