example\Plugin::init PHP Method

init() public method

public init ( )
    public function init()
    {
        parent::init();
        // register your events here
        // using anonymous function
        \Pimcore::getEventManager()->attach("document.postAdd", function ($event) {
            // do something
            $document = $event->getTarget();
        });
        // using methods
        \Pimcore::getEventManager()->attach("document.postUpdate", [$this, "handleDocument"]);
        // for more information regarding events, please visit:
        // https://www.pimcore.org/docs/latest/Extending_Pimcore/Event_API_and_Event_Manager.html
        // http://framework.zend.com/manual/1.12/de/zend.event-manager.event-manager.html
        // https://www.pimcore.org/docs/latest/Extending_Pimcore/Plugin_Developers_Guide/Plugin_Class.html
    }