Creating a trigger on attribute change

Author Message

Robert Munteanu

Wednesday 15 December 2004 9:14:23 am

Hi all,

I want to achieve the following:

If user with role A edits a certain object, and changes a certain attribute a custom event should be triggered. I do not know how to create that trigger. Can someone please point me in the right direction?

Thanks,

Robert

Silke Fox

Thursday 16 December 2004 1:09:52 am

Hi Robert,

I would suggest to use the "content publish after" trigger to start the event and then check if that attribute is changed within the event, otherwise do nothing.
Unfortunately this will start the event whenever an object is published, but perhaps you can use the "multiplexer" workflow to restrict this on a certain content class.

I hope this is feasible for you; as far as I know it's not too easy to create a new trigger...

silke

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:02:35
Script start
Timing: Jan 18 2025 19:02:35
Module start 'layout'
Timing: Jan 18 2025 19:02:35
Module start 'content'
Timing: Jan 18 2025 19:02:36
Module end 'content'
Timing: Jan 18 2025 19:02:36
Script end

Main resources:

Total runtime1.5433 sec
Peak memory usage4,096.0000 KB
Database Queries54

Timing points:

CheckpointStart (sec)Duration (sec)Memory at start (KB)Memory used (KB)
Script start 0.00000.0060 588.0313152.6406
Module start 'layout' 0.00600.0044 740.671939.4609
Module start 'content' 0.01041.5314 780.1328457.2188
Module end 'content' 1.54180.0015 1,237.35168.1563
Script end 1.5433  1,245.5078 

Time accumulators:

 Accumulator Duration (sec) Duration (%) Count Average (sec)
Ini load
Load cache0.00370.2376160.0002
Check MTime0.00130.0848160.0001
Mysql Total
Database connection0.00090.056810.0009
Mysqli_queries1.489696.5149540.0276
Looping result0.00060.0408520.0000
Template Total1.486296.320.7431
Template load0.00250.165020.0013
Template processing1.483696.130620.7418
Template load and register function0.00020.011310.0002
states
state_id_array0.00210.137210.0021
state_identifier_array0.00130.082020.0006
Override
Cache load0.00190.1245140.0001
Sytem overhead
Fetch class attribute can translate value0.00090.061220.0005
Fetch class attribute name0.00120.079420.0006
XML
Image XML parsing0.00050.031020.0002
class_abstraction
Instantiating content class attribute0.00000.000520.0000
General
dbfile0.00730.4759100.0007
String conversion0.00000.000740.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
2content/datatype/view/ezxmltext.tpl<No override>extension/community_design/design/suncana/templates/content/datatype/view/ezxmltext.tplEdit templateOverride template
3content/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
1print_pagelayout.tpl<No override>extension/community/design/community/templates/print_pagelayout.tplEdit templateOverride template
 Number of times templates used: 8
 Number of unique templates used: 5

Time used to render debug report: 0.0001 secs