- Symphony 2.7.9
-
› assets
14 -
› boot
15 -
› core
24 -
› cryptography
4 -
› data-sources
6 -
› email-gateways
3 -
› events
3 -
› global
62 -
› interface
9 -
› toolkit
60 - Delegates101
- Deprecated28
Versions
- 2.7.9
- 2.7.8
- 2.7.7
- 2.7.6
- 2.7.5
- 2.7.3
- 2.7.2
- 2.7.10
- 2.7.1
- 2.7.0
- 2.6.9
- 2.6.8
- 2.6.7
- 2.6.6
- 2.6.5
- 2.6.4
- 2.6.3
- 2.6.2
- 2.6.11
- 2.6.10
- 2.6.1
- 2.6.0
- 2.5.3
- 2.5.2
- 2.5.1
- 2.5.0
- 2.4
- 2.3.6
- 2.3.5
- 2.3.4
- 2.3.3
- 2.3.2
- 2.3.1
- 2.3
- 2.2.5
- 2.2.4
- 2.2.3
- 2.2.2
- 2.2.1
- 2.2
Options
Delegates in Symphony 2.7.9
Delegates are functions in Symphony's core that allow extension developers to intervene at key moments in the generation of a back-end or front-end Symphony page. The delegate will usually provide a contextually relevant PHP object (for instance a page object or an event object) that the developer can then work with and pass back to the system for further processing.
/all/
/backend/
AdminPagePostCallback(
$page='/backend/', $context)
Immediately after determining which class will resolve the current page, this delegate allows extension to modify the routing or provide additional information.
Context
AdminPagePostGenerate(
$page='/backend/', $context)
Immediately after generating the admin page. Provided with string containing page source
Context
AdminPagePreBuild(
$page='/backend/', $context)
Immediately before building the admin page. Provided with the page parameter
Context
AdminPagePreGenerate(
$page='/backend/', $context)
Immediately before generating the admin page. Provided with the page object
Context
AppendPageAlert(
$page='/backend/')
Allows for appending of alerts. Administration::instance()->Page->Alert is way to tell what is currently in the system
CanAccessPage(
$page='/backend/', $context)
Immediately after the core access rules allowed access to this page
(i.e. not called if the core rules denied it).
Extension developers must only further restrict access to it.
Extension developers must also take care of checking the current value
of the allowed parameter in order to prevent conflicts with other extensions.
$context['allowed'] = $context['allowed'] && customLogic();
Context
InitialiseAdminPageHead(
$page='/backend/')
Allows developers to insert items into the page HEAD. Use
Administration::instance()->Page
for access to the page object.
ModifyFieldPublishWidget(
$page='/backend/', $context)
Allows developers modify the field before it is rendered in the publish
form. Passes the Field
object, Entry
object, the XMLElement
div and
any errors for the entire Entry
. Only the $div
element
will be altered before appending to the page, the rest are read only.
Context
ModifyTextareaFieldPublishWidget(
$page='/backend/', $context)
Allows developers modify the textarea before it is rendered in the publish forms
Context
PreRenderHeaders(
$page='/backend/')
This is just prior to the page headers being rendered, and is suitable for changing them
/backend/ resp. /frontend/
EntryPreCheckPostFieldData(
$page='/backend/' resp. '/frontend/', $context)
Prior to checking a field's post data.
Context
/blueprints/datasources/
DatasourcePostCreate(
$page='/blueprints/datasources/', $context)
After creating the Datasource, the path to the Datasource file is provided
Context
DatasourcePostEdit(
$page='/blueprints/datasources/', $context)
After editing the Datasource, the path to the Datasource file is provided
Context
DatasourcePreCreate(
$page='/blueprints/datasources/', $context)
Prior to creating the Datasource, the file path where it will be written to is provided and well as the contents of that file.
Context
DatasourcePreDelete(
$page='/blueprints/datasources/', $context)
Prior to deleting the Datasource file. Target file path is provided.
Context
DatasourcePreEdit(
$page='/blueprints/datasources/', $context)
Prior to editing a Datasource, the file path where it will be written to is provided and well as the contents of that file.
Context
/blueprints/datasources/ or /blueprints/events/
AddCustomActions(
$page='/blueprints/datasources/' or '/blueprints/events/', $context)
Allows an extension to modify the existing options for this page's
With Selected menu. If the $options
parameter is an empty array,
the 'With Selected' menu will not be rendered.
Context
CustomActions(
$page='/blueprints/datasources/' or '/blueprints/events/', $context)
Extensions can listen for any custom actions that were added
through AddCustomPreferenceFieldsets
or AddCustomActions
delegates.
Context
/blueprints/events/
EventPostCreate(
$page='/blueprints/events/', $context)
After creating the Event, the path to the Event file is provided
Context
EventPostEdit(
$page='/blueprints/events/', $context)
After editing the Event, the path to the Event file is provided
Context
EventPreDelete(
$page='/blueprints/events/', $context)
Prior to deleting the Event file. Target file path is provided.
Context
EventPreEdit(
$page='/blueprints/events/', $context)
Prior to editing an Event, the file path where it will be written to is provided and well as the contents of that file.
Context
EventsPreCreate(
$page='/blueprints/events/', $context)
Prior to creating an Event, the file path where it will be written to is provided and well as the contents of that file.
Context
/blueprints/events/(edit|new|info)/
AppendEventFilter(
$page='/blueprints/events/(edit|new|info)/', $context)
Allows adding of new filter rules to the Event filter rule select box
Context
AppendEventFilterDocumentation(
$page='/blueprints/events/(edit|new|info)/', $context)
Allows adding documentation for new filters. A reference to the $documentation array is provided, along with selected filters
Context
/blueprints/pages/
AppendPageContent(
$page='/blueprints/pages/', $context)
After all Page related Fields have been added to the DOM, just before the actions.
Context
PagePostCreate(
$page='/blueprints/pages/', $context)
Just after the creation of a new page in tbl_pages
Context
PagePostDelete(
$page='/blueprints/pages/', $context)
Fires after all Pages have been deleted
Context
PagePostEdit(
$page='/blueprints/pages/', $context)
Just after updating a page in tbl_pages
Context
PagePostValidate(
$page='/blueprints/pages/', $context)
Just after the Symphony validation has run, allows Developers to run custom validation logic on a Page
Context
PagePreCreate(
$page='/blueprints/pages/', $context)
Just prior to creating a new Page record in tbl_pages
, provided
with the $fields
associative array. Use with caution, as no
duplicate page checks are run after this delegate has fired
Context
PagePreDelete(
$page='/blueprints/pages/', $context)
Prior to deleting Pages
Context
PagePreEdit(
$page='/blueprints/pages/', $context)
Just prior to updating a Page record in tbl_pages
, provided
with the $fields
associative array. Use with caution, as no
duplicate page checks are run after this delegate has fired
Context
PageTemplatePostCreate(
$page='/blueprints/pages/', $context)
Just after a Page Template is saved after been created.
Context
PageTemplatePreCreate(
$page='/blueprints/pages/', $context)
Just before a Page Template is about to be created & written to disk
Context
PageTypePreCreate(
$page='/blueprints/pages/', $context)
Just before the page's types are saved into tbl_pages_types
.
Use with caution as no further processing is done on the $types
array to prevent duplicate $types
from occurring (ie. two index
page types). Your logic can use the PageManger::hasPageTypeBeenUsed
function to perform this logic.
Context
/blueprints/pages/template/
PageTemplatePostEdit(
$page='/blueprints/pages/template/', $context)
Just after a Page Template has been edited and written to disk
Context
PageTemplatePreEdit(
$page='/blueprints/pages/template/', $context)
Just before a Page Template is about to written to disk
Context
/blueprints/sections/
AddSectionElements(
$page='/blueprints/sections/', $context)
Allows extensions to add elements to the header of the Section Editor
form. Usually for section settings, this delegate is passed the current
$meta
array and the $this->_errors
array.
Context
FieldPostCreate(
$page='/blueprints/sections/', $context)
After creation of a Field.
Context
FieldPostEdit(
$page='/blueprints/sections/', $context)
After editing of a Field.
Context
SectionPostCreate(
$page='/blueprints/sections/', $context)
After the Section has been created, and all the Field's have been created for this section, but just before the redirect
Context
SectionPostEdit(
$page='/blueprints/sections/', $context)
After the Section has been updated, and all the Field's have been updated for this section, but just before the redirect
Context
SectionPreCreate(
$page='/blueprints/sections/', $context)
Just prior to saving the Section settings. Use with caution as there is no additional processing to ensure that Field's or Section's are unique.
Context
SectionPreDelete(
$page='/blueprints/sections/', $context)
Just prior to calling the Section Manager's delete function
Context
SectionPreEdit(
$page='/blueprints/sections/', $context)
Just prior to updating the Section settings. Use with caution as there is no additional processing to ensure that Field's or Section's are unique.
Context
/frontend/
DataSourceEntriesBuilt(
$page='/frontend/', $context)
Immediately after building entries allow modification of the Data Source entries array
Context
DataSourcePostExecute(
$page='/frontend/', $context)
After the datasource has executed, either by itself or via the
DataSourcePreExecute
delegate, and if the $xml
variable is truthy,
this delegate allows extensions to modify the output XML and parameter pool
Context
DataSourcePreExecute(
$page='/frontend/', $context)
Allows extensions to execute the data source themselves (e.g. for caching) and providing their own output XML instead
Context
EventFinalSaveFilter(
$page='/frontend/', $context)
This delegate that lets extensions know the final status of the
current Event. It is triggered when everything has processed correctly.
The $messages
array contains the results of the previous filters that
have executed, and the $errors
array contains any errors that have
occurred as a result of this delegate. These errors cannot stop the
processing of the Event, as that has already been done.
Context
EventPostSaveFilter(
$page='/frontend/', $context)
After saving entry from the front-end. This delegate will not force
the Events to terminate if it populates the $filter_results
array.
Provided with references to this object, the $_POST
data and also
the error array
Context
EventPreSaveFilter(
$page='/frontend/', $context)
Prior to saving entry from the front-end. This delegate will
force the Event to terminate if it populates the $filter_results
array. All parameters are passed by reference.
Context
FrontendDevKitResolve(
$page='/frontend/', $context)
Allows a devkit object to be specified, and stop continued execution:
Context
FrontendEventPostProcess(
$page='/frontend/', $context)
Just after the page events have triggered. Provided with the XML object
Context
FrontendInitialised(
$page='/frontend/')
FrontendInitialised
is fired just after the $_page
variable has been
created with an instance of the FrontendPage
class. This delegate is
fired just before the FrontendPage->generate()
.
FrontendOutputPostGenerate(
$page='/frontend/', $context)
Immediately after generating the page. Provided with string containing page source
Context
FrontendOutputPreGenerate(
$page='/frontend/', $context)
Immediately before generating the page. Provided with the page object, XML and XSLT
Context
FrontendPageResolved(
$page='/frontend/', $context)
Just after having resolved the page, but prior to any commencement of output creation
Context
FrontendParamsPostResolve(
$page='/frontend/', $context)
Access to the resolved param pool, including additional parameters provided by Data Source outputs
Context
FrontendParamsResolve(
$page='/frontend/', $context)
Just after having resolved the page params, but prior to any commencement of output creation
Context
FrontendPrePageResolve(
$page='/frontend/', $context)
Before page resolve. Allows manipulation of page without redirection
Context
FrontendPreRenderHeaders(
$page='/frontend/')
This is just prior to the page headers being rendered, and is suitable for changing them
FrontendProcessEvents(
$page='/frontend/', $context)
Manipulate the events array and event element wrapper
Context
/frontend/ or /backend/
PostQueryExecution(
$page='/frontend/' or '/backend/', $context)
After a query has successfully executed, that is it was considered valid SQL, this delegate will provide the query, the query_hash and the execution time of the query.
Note that this function only starts logging once the ExtensionManager is available, which means it will not fire for the first couple of queries that set the character set.
Context
QueryExecutionError(
$page='/frontend/' or '/backend/', $context)
After a query execution has failed this delegate will provide the query, query hash, error message and the error number.
Note that this function only starts logging once the ExtensionManager
is available, which means it will not fire for the first couple of
queries that set the character set.
Context
/login/
AuthorLoginFailure(
$page='/login/', $context)
A failed login attempt into the Symphony backend
Context
AuthorLoginSuccess(
$page='/login/', $context)
A successful login attempt into the Symphony backend
Context
AuthorPostPasswordResetFailure(
$page='/login/', $context)
When a password reset has been attempted, but Symphony doesn't recognise the credentials the user has given.
Context
AuthorPostPasswordResetSuccess(
$page='/login/', $context)
When a password reset has occurred and after the Password Reset email has been sent.
Context
/publish/
AddCustomPublishColumn(
$page='/publish/', $context)
Allows the creation of custom table columns for each entry. Called after all the Section Visible columns have been added as well as the Section Associations
Context
AddCustomPublishColumnData(
$page='/publish/', $context)
Allows Extensions to inject custom table data for each Entry into the Publish Index
Context
AdjustPublishFiltering(
$page='/publish/', $context)
Allows adjustments to be made to the SQL where and joins statements before they are used to fetch the entries for the page
Context
Delete(
$page='/publish/', $context)
Prior to deletion of entries.
Context
EntryPostDelete(
$page='/publish/', $context)
After the deletion of entries, this delegate provides an array of Entry ID's that were deleted.
Context
EntryPreDelete(
$page='/publish/', $context)
Prior to deletion of entries. An array of Entry ID's is provided which
can be manipulated. This delegate was renamed from Delete
to EntryPreDelete
in Symphony 2.3.
Context
PrepareAssociationsDrawer(
$page='/publish/', $context)
Prepare Associations Drawer from an Extension
Context
/publish/edit/
EntryPostEdit(
$page='/publish/edit/', $context)
Just after the editing of an Entry
Context
EntryPreEdit(
$page='/publish/edit/', $context)
Just prior to editing of an Entry.
Context
EntryPreRender(
$page='/publish/edit/', $context)
Just prior to rendering of an Entry edit form.
Context
/publish/new/
EntryPostCreate(
$page='/publish/new/', $context)
Creation of an Entry. New Entry object is provided.
Context
EntryPreCreate(
$page='/publish/new/', $context)
Just prior to creation of an Entry
Context
/system/authors/
AddCustomAuthorColumn(
$page='/system/authors/', $context)
Allows the creation of custom table columns for each author. Called after all the table headers columns have been added.
Context
AddCustomAuthorColumnData(
$page='/system/authors/', $context)
Allows Extensions to inject custom table data for each Author into the Authors Index
Context
AddDefaultAuthorAreas(
$page='/system/authors/', $context)
Allows injection or manipulation of the Default Area dropdown for an Author. Take care with adding in options that are only valid for Developers, as if a normal Author is set to that option, they will be redirected to their own Author record.
Context
AddElementstoAuthorForm(
$page='/system/authors/', $context)
Allows the injection of custom form fields given the current $this->Form
object. Please note that this custom data should be saved in own extension
tables and that modifying tbl_authors
to house your data is highly discouraged.
Context
AuthorPostCreate(
$page='/system/authors/', $context)
Creation of a new Author. The Author object is provided as read only through this delegate.
Context
AuthorPostDelete(
$page='/system/authors/', $context)
After deleting an author, provided with the Author ID.
Context
AuthorPostEdit(
$page='/system/authors/', $context)
After editing an author, provided with the Author object
Context
AuthorPreCreate(
$page='/system/authors/', $context)
Creation of a new Author. The Author object is provided as read only through this delegate.
Context
AuthorPreDelete(
$page='/system/authors/', $context)
Prior to deleting an author, provided with the Author ID.
Context
AuthorPreEdit(
$page='/system/authors/', $context)
Before editing an author, provided with the Author object
Context
/system/extensions/
ExtensionPreDisable(
$page='/system/extensions/', $context)
Notifies just before an Extension is to be disabled.
Context
ExtensionPreEnable(
$page='/system/extensions/', $context)
Notifies just before an Extension is to be enabled.
Context
ExtensionPreUninstall(
$page='/system/extensions/', $context)
Notifies just before an Extension is to be uninstalled
Context
/system/preferences/
AddCachingOpportunity(
$page='/system/preferences/', $context)
Add custom Caching groups. For example a Datasource extension might want to add in the ability for set a cache driver for it's functionality. This should usually be a dropdown, which allows a developer to select what driver they want to use for caching. This choice is stored in the Configuration in a Caching node. eg. 'caching' => array ( 'remotedatasource' => 'database', 'dynamicds' => 'YourCachingExtensionClassName' )
Context
AddCustomPreferenceFieldsets(
$page='/system/preferences/', $context)
Add Extension custom preferences. Use the $wrapper reference to append objects.
Context
Save(
$page='/system/preferences/', $context)
Just prior to saving the preferences and writing them to the CONFIG
Allows extensions to preform custom validation logic on the settings.