Overview

Namespaces

  • DcGeneral
    • Clipboard
    • Contao
      • Callback
      • Compatibility
      • DataDefinition
        • Definition
      • Dca
        • Builder
          • Legacy
        • Definition
        • Palette
        • Populator
      • Event
      • View
        • Contao2BackendView
          • Event
    • Controller
    • Data
    • DataDefinition
      • Builder
      • Definition
        • Properties
        • View
          • Panel
      • ModelRelationship
      • Palette
        • Builder
          • Event
        • Condition
          • Palette
          • Property
    • EnvironmentPopulator
    • Event
    • Exception
    • Factory
      • Event
    • Panel
    • View
      • Event

Classes

  • AbstractCallbackListener
  • AbstractReturningCallbackListener
  • AbstractStaticCallbackListener
  • Callbacks
  • ContainerGetBreadcrumbCallbackListener
  • ContainerGlobalButtonCallbackListener
  • ContainerHeaderCallbackListener
  • ContainerOnCopyCallbackListener
  • ContainerOnCutCallbackListener
  • ContainerOnDeleteCallbackListener
  • ContainerOnLoadCallbackListener
  • ContainerOnSubmitCallbackListener
  • ContainerPasteButtonCallbackListener
  • ContainerPasteRootButtonCallbackListener
  • ModelChildRecordCallbackListener
  • ModelGroupCallbackListener
  • ModelLabelCallbackListener
  • ModelOperationButtonCallbackListener
  • ModelOptionsCallbackListener
  • PropertyInputFieldCallbackListener
  • PropertyInputFieldGetWizardCallbackListener
  • PropertyOnLoadCallbackListener
  • PropertyOnSaveCallbackListener
  • Overview
  • Namespace
  • Class
  • Tree
  • Deprecated
  • Todo
 1: <?php
 2: /**
 3:  * PHP version 5
 4:  * @package    generalDriver
 5:  * @author     Christian Schiffler <c.schiffler@cyberspectrum.de>
 6:  * @author     Stefan Heimes <stefan_heimes@hotmail.com>
 7:  * @author     Tristan Lins <tristan.lins@bit3.de>
 8:  * @copyright  The MetaModels team.
 9:  * @license    LGPL.
10:  * @filesource
11:  */
12: 
13: namespace DcGeneral\Contao\Callback;
14: 
15: /**
16:  * Class AbstractReturningCallbackListener.
17:  *
18:  * Abstract base class for callbacks that are returning a value.
19:  *
20:  * @package DcGeneral\Contao\Callback
21:  */
22: abstract class AbstractReturningCallbackListener extends AbstractCallbackListener
23: {
24:     /**
25:      * Update the values in the event with the value returned by the callback.
26:      *
27:      * @param \Symfony\Component\EventDispatcher\Event $event The event being emitted.
28:      *
29:      * @param mixed                                    $value The value returned by the callback.
30:      *
31:      * @return void
32:      */
33:     abstract public function update($event, $value);
34: 
35:     /**
36:      * {@inheritdoc}
37:      */
38:     public function __invoke($event)
39:     {
40:         if ($this->getCallback())
41:         {
42:             $this->update(
43:                 $event,
44:                 Callbacks::callArgs($this->getCallback(), $this->getArgs($event))
45:             );
46:         }
47:     }
48: }
49: 
contao-community-alliance/dc-general API documentation generated by ApiGen 2.8.0