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! :-)

Powered by eZ Publish™ CMS Open Source Web Content Management. Copyright © 1999-2014 eZ Systems AS (except where otherwise noted). All rights reserved.

eZ debug

Timing: Jan 30 2025 21:18:58
Script start
Timing: Jan 30 2025 21:18:58
Module start 'layout'
Timing: Jan 30 2025 21:18:58
Module start 'content'
Timing: Jan 30 2025 21:19:00
Module end 'content'
Timing: Jan 30 2025 21:19:00
Script end

Main resources:

Total runtime1.0902 sec
Peak memory usage8,192.0000 KB
Database Queries57

Timing points:

CheckpointStart (sec)Duration (sec)Memory at start (KB)Memory used (KB)
Script start 0.00000.0047 588.2656151.2266
Module start 'layout' 0.00470.0034 739.4922220.7188
Module start 'content' 0.00811.0812 960.21094,441.7422
Module end 'content' 1.08930.0009 5,401.953111.8125
Script end 1.0901  5,413.7656 

Time accumulators:

 Accumulator Duration (sec) Duration (%) Count Average (sec)
Ini load
Load cache0.00340.3103160.0002
Check MTime0.00130.1163160.0001
Mysql Total
Database connection0.00080.071710.0008
Mysqli_queries1.008092.4600570.0177
Looping result0.00050.0438550.0000
Template Total1.043995.820.5219
Template load0.00180.163320.0009
Template processing1.042195.588720.5210
Template load and register function0.00150.134410.0015
states
state_id_array0.00150.133010.0015
state_identifier_array0.00090.081420.0004
Override
Cache load0.00150.1390180.0001
Sytem overhead
Fetch class attribute can translate value0.00190.173320.0009
Fetch class attribute name0.00200.180940.0005
XML
Image XML parsing0.00340.315520.0017
class_abstraction
Instantiating content class attribute0.00000.000840.0000
General
dbfile0.00440.4014170.0003
String conversion0.00000.000540.0000
Note: percentages do not add up to 100% because some accumulators overlap

Templates used to render the page:

UsageRequested templateTemplateTemplate loadedEditOverride
1node/view/full.tplfull/forum_topic.tplextension/sevenx/design/simple/override/templates/full/forum_topic.tplEdit templateOverride template
3content/datatype/view/ezxmltext.tpl<No override>extension/community_design/design/suncana/templates/content/datatype/view/ezxmltext.tplEdit templateOverride template
5content/datatype/view/ezxmltags/paragraph.tpl<No override>extension/ezwebin/design/ezwebin/templates/content/datatype/view/ezxmltags/paragraph.tplEdit templateOverride template
1content/datatype/view/ezxmltags/literal.tpl<No override>extension/community/design/standard/templates/content/datatype/view/ezxmltags/literal.tplEdit templateOverride template
2content/datatype/view/ezxmltags/line.tpl<No override>design/standard/templates/content/datatype/view/ezxmltags/line.tplEdit templateOverride template
1content/datatype/view/ezimage.tpl<No override>extension/sevenx/design/simple/templates/content/datatype/view/ezimage.tplEdit templateOverride template
1print_pagelayout.tpl<No override>extension/community/design/community/templates/print_pagelayout.tplEdit templateOverride template
 Number of times templates used: 14
 Number of unique templates used: 7

Time used to render debug report: 0.0001 secs