Forums / Developer / Trigger for after remove content

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