Content Action

Author Message

Stefano Vaghi

Thursday 29 May 2008 6:43:17 am

Hi,

I am creating an interface to edit a particular content class. I don't undestand how the "button mechanism" works.

For example, for my class I want to have standard action mechanism (edit, delete...), and other custom actions.
I see that all admin buttons call the view "action" of module "content", with a particular name (for example "EditButton").
I see that for custom buttons, I have to use the name "NewButton".

But, where do I set what will be the action produced (what's going to happen if I push that button)?

Thanks

Kristof Coomans

Friday 30 May 2008 1:17:14 am

Hi Stefano

The view "action" of the module "content" uses the script action.php. You can find this out by inspecting the $ViewList variable in kernel/content/module.php. In the same array, there are mappings from POST variables to actions. In the view script (in this case action.php) the current action can be fetched by using $Module->currentAction() or there is checked if the current action is 'whatever' with $Module->isCurrentAction( 'whatever' ).

You can find some more information about this on http://ezpedia.org/wiki/en/ez/module

independent eZ Publish developer and service provider | http://blog.coomanskristof.be | http://ezpedia.org

Stefano Vaghi

Monday 02 June 2008 3:37:56 am

thanks for your answer... :)

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 18 2025 19:12:28
Script start
Timing: Jan 18 2025 19:12:28
Module start 'layout'
Timing: Jan 18 2025 19:12:28
Module start 'content'
Timing: Jan 18 2025 19:12:29
Module end 'content'
Timing: Jan 18 2025 19:12:29
Script end

Main resources:

Total runtime0.8652 sec
Peak memory usage4,096.0000 KB
Database Queries57

Timing points:

CheckpointStart (sec)Duration (sec)Memory at start (KB)Memory used (KB)
Script start 0.00000.0097 588.9063152.6094
Module start 'layout' 0.00970.0097 741.515639.4063
Module start 'content' 0.01940.8444 780.9219531.1641
Module end 'content' 0.86380.0014 1,312.085912.2031
Script end 0.8652  1,324.2891 

Time accumulators:

 Accumulator Duration (sec) Duration (%) Count Average (sec)
Ini load
Load cache0.00510.5936160.0003
Check MTime0.00150.1702160.0001
Mysql Total
Database connection0.00140.159410.0014
Mysqli_queries0.801692.6454570.0141
Looping result0.00060.0664550.0000
Template Total0.789491.220.3947
Template load0.00330.384620.0017
Template processing0.786190.852220.3930
Template load and register function0.00050.052410.0005
states
state_id_array0.00330.384310.0033
state_identifier_array0.00130.145020.0006
Override
Cache load0.00300.3425170.0002
Sytem overhead
Fetch class attribute can translate value0.00120.139120.0006
Fetch class attribute name0.00120.140940.0003
XML
Image XML parsing0.00070.075620.0003
class_abstraction
Instantiating content class attribute0.00000.000940.0000
General
dbfile0.00100.1155160.0001
String conversion0.00000.001340.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
4content/datatype/view/ezxmltags/paragraph.tpl<No override>extension/ezwebin/design/ezwebin/templates/content/datatype/view/ezxmltags/paragraph.tplEdit templateOverride template
1content/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: 11
 Number of unique templates used: 6

Time used to render debug report: 0.0001 secs