public abstract class Event

class.event.php #18

The abstract Event classes defines some base methods that all Events inherit. It has one abstract method, __trigger(), which Events must implement. Event execution is determined based on an action (which maps to a form action from the Frontend). A load function determines whether this Event matches the action and if so, call the Event's __trigger() to run the logic. On every page load, all Event's that are attached to the page will have their load function's executed. Events are called in order of their priority and if there is more than one event with the same priority, in alphabetical order. An event class is saved through the Symphony backend, which uses an event template defined in TEMPLATE . /event.tpl Events implement the iEvent interface, which defines the load and about functions.


public static
class.event.php #24
static integer kHIGH = 3

Represents High Priority, that this event should run first

public static
class.event.php #37
static integer kLOW = 1

Represents High Priority, that this event should run last

public static
class.event.php #31
static integer kNORMAL = 2

Represents Normal Priority, that this event should run normally. This is the default Event Priority


void __construct(array $env)

The constructor for an Event sets $this->_env from the given parameters

  • $env arrayThe environment variables from the Frontend class which includes any params set by Symphony or Datasources or by other Events

public static
class.event.php #66
static boolean allowEditorToParse()

This function is required in order to edit it in the event editor page. Do not overload this function if you are creating a custom event. It is only used by the event editor.


true if event can be edited, false otherwise. Defaults to false

public static
class.event.php #92
static string|XMLElement documentation()

Returns a string of HTML or an XMLElement of documentation for the current event. By default this will be an example of a HTML form that can populate the chosen section and any filter information. Documentation is shown in the Symphony backend when a user tries to edit an event but it's allowEditorToParse() returns false. If this is not implemented by the event, a default Symphony message will appear.

static mixed getNotificationTemplate(string $language)

Returns the path to the email-notification-template by looking at the WORKSPACE/template/ directory, then at the TEMPLATES directory for the convention notification.*.tpl. If the template is not found, false is returned

  • $language stringLanguage used in system


String, which is the path to the template if the template is found, false otherwise

public static
class.event.php #78
static integer getSource()

This function is required in order to identify what section this event is for. It is used in the event editor. It must remain intact. Do not overload this function in custom events.

integer priority()

Priority determines Event importance and when it should be executed. The default priority for an event is Event::kNORMAL, with Event::kHIGH and Event::kLOW being the other available options. Events execution is Event::kHIGH to Event::kNORMAL to Event::kLOW. If there are more than one event at the same priority level, they are sorted alphabetically by event handle and executed in that order for that priority.


The available constants are Event::kLOW, Event::kNORMAL and Event::kHIGH. Defaults to Event::kNORMAL

See Also

Symphony • Open Source XSLT CMS

Server Requirements

  • PHP 5.3-5.6 or 7.0-7.3
  • PHP's LibXML module, with the XSLT extension enabled (--with-xsl)
  • MySQL 5.5 or above
  • An Apache or Litespeed webserver
  • Apache's mod_rewrite module or equivalent

Compatible Hosts

Sign in

Login details