Overview

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.

Usage

Extensions can subscribe to delegates by declaring a getSubscribedDelegates() function in the extension.driver.php file, like this:

            
    public function getSubscribedDelegates(){
        return array(
            array(
                'page' => '/delegatepage/',
                'delegate' => 'DelegateName',
                'callback' => 'extensionFunction'
            ),
        );
    }
          

getSubscribedDelegates() is expected to return an array of subscriptions, each of which is an array consisting of three key/value pairs: page, delegate, and callback. The first two values are defined by the delegate itself (see the list below). The last value is the name of a callback function provided by the extension.

During normal system processing, delegates fire notifyMembers() functions, which allows any subscribed extensions to intervene before processing continues.

See the API Docs for a full list of delegates.

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