Trigger for after remove content

Author Message

Fou Jino

Monday 07 February 2011 3:54:10 am

hey everyone,

Is it possible to use a workflow in a trigger for after remove content ?

my workflow is OK but I don't know how to use it in a after remove trigger

if anyone can help me ?

thanks

Foujino ~ http://www.foujino-blog.be

Marko Žmak

Monday 07 February 2011 4:43:32 am

You should add:

[OperationSettings]
AvailableOperationList[]=content_delete

to your settings/override/workflow.ini.append.php. Clear the cache and after that the before and after delete triggers will be available in your admin siteaccess under "Triggers".

--
Nothing is impossible. Not if you can imagine it!

Hubert Farnsworth

Fou Jino

Tuesday 08 February 2011 12:02:42 am

Yep !

It's work perfectly, thank you Marko Žmak !

Subject resolved :)

Foujino ~ http://www.foujino-blog.be

Andy Caiger

Friday 06 May 2011 3:38:24 am

This is helpful for setting up triggers and events, but I can't get eZ Publish to run my code when an object is deleted. Can anyone provide a template for the event PHP code?

EAB - Integrated Internet Success
Offices in England, France & China.
http://www.eab.co.uk http://www.eab-china.com http://www.eab-france.com

Marko Žmak

Friday 06 May 2011 3:51:45 am

"

This is helpful for setting up triggers and events, but I can't get eZ Publish to run my code when an object is deleted. Can anyone provide a template for the event PHP code?

"

This setting just enables the after delete trigger which can then be used to start your custom workflow. So you'll need to create your custom workflow event. See this tutorial:

  • http://share.ez.no/learn/ez-publish/creating-a-simple-custom-workflow-event

--
Nothing is impossible. Not if you can imagine it!

Hubert Farnsworth

Fou Jino

Friday 06 May 2011 4:19:44 am

Hi Andy,

As Marko says, you have to create a custom workflow and then affect this workflow to a trigger.

You can find a complete example of how to create a custom workflow here : http://www.foujino-blog.be/2011/01/26/ez-publish-creer-un-workflow/

Foujino ~ http://www.foujino-blog.be

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 02:01:03
Script start
Timing: Jan 18 2025 02:01:03
Module start 'layout'
Timing: Jan 18 2025 02:01:03
Module start 'content'
Timing: Jan 18 2025 02:01:04
Module end 'content'
Timing: Jan 18 2025 02:01:04
Script end

Main resources:

Total runtime1.3980 sec
Peak memory usage4,096.0000 KB
Database Queries68

Timing points:

CheckpointStart (sec)Duration (sec)Memory at start (KB)Memory used (KB)
Script start 0.00000.0065 589.0391152.6250
Module start 'layout' 0.00650.0124 741.664139.4531
Module start 'content' 0.01891.3777 781.1172613.4922
Module end 'content' 1.39660.0014 1,394.609416.1563
Script end 1.3979  1,410.7656 

Time accumulators:

 Accumulator Duration (sec) Duration (%) Count Average (sec)
Ini load
Load cache0.00370.2667160.0002
Check MTime0.00160.1117160.0001
Mysql Total
Database connection0.00090.061310.0009
Mysqli_queries1.320794.4700680.0194
Looping result0.00070.0510660.0000
Template Total1.351696.720.6758
Template load0.00290.208720.0015
Template processing1.348696.466820.6743
Template load and register function0.00020.012910.0002
states
state_id_array0.00080.058610.0008
state_identifier_array0.00220.158220.0011
Override
Cache load0.00260.1828310.0001
Sytem overhead
Fetch class attribute can translate value0.00080.055430.0003
Fetch class attribute name0.00110.077380.0001
XML
Image XML parsing0.00140.100430.0005
class_abstraction
Instantiating content class attribute0.00000.001390.0000
General
dbfile0.00100.0714240.0000
String conversion0.00000.000840.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
6content/datatype/view/ezxmltext.tpl<No override>extension/community_design/design/suncana/templates/content/datatype/view/ezxmltext.tplEdit templateOverride template
8content/datatype/view/ezxmltags/paragraph.tpl<No override>extension/ezwebin/design/ezwebin/templates/content/datatype/view/ezxmltags/paragraph.tplEdit templateOverride template
3content/datatype/view/ezimage.tpl<No override>extension/sevenx/design/simple/templates/content/datatype/view/ezimage.tplEdit templateOverride template
1content/datatype/view/ezxmltags/literal.tpl<No override>extension/community/design/standard/templates/content/datatype/view/ezxmltags/literal.tplEdit templateOverride template
1content/datatype/view/ezxmltags/quote.tpldatatype/ezxmltext/quote.tplextension/ezwebin/design/ezwebin/override/templates/datatype/ezxmltext/quote.tplEdit templateOverride template
1content/datatype/view/ezxmltags/li.tpl<No override>design/standard/templates/content/datatype/view/ezxmltags/li.tplEdit templateOverride template
1content/datatype/view/ezxmltags/ul.tpl<No override>design/standard/templates/content/datatype/view/ezxmltags/ul.tplEdit templateOverride template
1print_pagelayout.tpl<No override>extension/community/design/community/templates/print_pagelayout.tplEdit templateOverride template
 Number of times templates used: 23
 Number of unique templates used: 9

Time used to render debug report: 0.0001 secs