This is the old documentation center for eZ Publish 4. We are currently migrating the eZ Publish documentation to http://confluence.ez.no the eZ Publish 5 documentation platform. Documentation for the eZ Publish legacy components are still located on this site, as well as all documentation for earlier releases.

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 3:50 pm)

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


Comments

There are no comments.