Forums / Developer / How to implement module's Function Limitation

How to implement module's Function Limitation

Author Message

Michael Scofield

Saturday 06 December 2008 7:56:17 pm

Hi,

I have a custom <i>module</i> where I have some <i>views</i> with <i>functions</i> associated with it.

The <i>functions</i> are declared using the <i>$FunctionList</i> array. For example:

$FunctionList = array();
$FunctionList['read'] = array();

But as you can see, I'm using an empty array, it means I don't have any <i>limitations</i> over the <i>function</i> <b>read</b>. If I go to the administrative area of Ez Publish, click at <i>User Accounts</i>, select a <i>role</i> and edit it and try to create a new <i>policy</i> for this <i>view</i>, I'm not able to specify the <i>Limitations</i>. Ez Publish just jumps the <i>Limitations creation screen</i> and shows for my new created <i>policy</i> the text "No limitations".

I'd like to use that feature. Where can I find the documentation for implementing a <i>function limitation</i> for my custom <i>module</i>? I tryed to copy some code from /kernel/ folder, but only part of it worked (now I can see the <i>Limitation screen</i> but the <i>limitations</i> don't really work in practice).

Thank you.
Michael

Piotrek Karaƛ

Saturday 06 December 2008 11:20:23 pm

http://ez.no/developer/forum/developer/limiting_within_viewlist_possible
http://ezpedia.org/wiki/en/ez/module
http://ez.no/doc/ez_publish/technical_manual/3_9/features/policy_functions

--
Company: mediaSELF Sp. z o.o., http://www.mediaself.pl
eZ references: http://ez.no/partners/worldwide_partners/mediaself
eZ certified developer: http://ez.no/certification/verify/272585
eZ blog: http://ez.ryba.eu

Michael Scofield

Sunday 07 December 2008 7:19:10 pm

Thank you! :-)