ez.no / exponential / documentation / development / extensions / workflow events / creating a new event
Events are grouped in different types of events. The most used group is Event.
The basic structure is that if you added an event x, it should be stored like this: extension/myextension/eventtypes/event/ezx/ezxtype.php.
All events should include the file ./kernel/classes/ezworkflowtype.php and inherit from eZWorkflowEventType. The event must implement the function execute.
If you have settings that should be set on the event you should create a template that is shown when you edit the workflow. The filename for an event x placed inside the Event group is extension/myextension/design/standard/templates/workflow/eventtype/edit/event_ezx.tpl.
Some templates return the status EZ_WORKFLOW_TYPE_STATUS_FETCH_TEMPLATE or EZ_WORKFLOW_TYPE_STATUS_FETCH_TEMPLATE_REPEAT and needs a template. The location of this template is defined in the event.
Our new event must be configured in the appropriate configuration file.
extension/myextension/settings/workflow.ini.append:
[EventSettings] ExtensionDirectories[]=myextension AvailableEventTypes[]=event_ezx
Log in or create a user account to comment.
Comments
A third line on the workflow.append to add
Xavier Dutoit
Sunday 05 June 2005 1:29:00 pm
Error: eZWorkflowType::loadAndRegisterType
Workflow type not found: event_yourevent
Then this line is going to make your day:
[EventSettings]
RepositoryDirectories[]=extension/myextension/eventtypes
If this isn't working for you...
Simon Phillips
Monday 28 February 2005 6:03:44 pm