You are here

class crumbs_InjectedAPI_Collection_CallbackCollection in Crumbs, the Breadcrumbs suite 7.2

Hierarchy

Expanded class hierarchy of crumbs_InjectedAPI_Collection_CallbackCollection

See also

crumbs_InjectedAPI_hookCrumbsPlugins

File

lib/InjectedAPI/Collection/CallbackCollection.php, line 6

View source
class crumbs_InjectedAPI_Collection_CallbackCollection {

  /**
   * @var callback[][][]
   *   Format: $[$module][$callbackType][$pluginKey] = $callback
   *   Where $callbackType = 'routeParent'|'routeTitle'|'entityParent'|'entityTitle'.
   */
  protected $callbacks = array();

  /**
   * @param string $module
   * @param string $callbackType
   *   One of 'routeParent', 'routeTitle', 'entityParent' and 'entityTitle'.
   * @param string $pluginKey
   *
   * @return callable|false
   */
  function getCallbackOrFalse($module, $callbackType, $pluginKey) {
    return isset($this->callbacks[$module][$callbackType][$pluginKey]) ? $this->callbacks[$module][$callbackType][$pluginKey] : FALSE;
  }

  /**
   * @param string $module
   * @param string $callbackType
   *   One of 'routeParent', 'routeTitle', 'entityParent' and 'entityTitle'.
   * @param string $pluginKey
   * @param callback $callback
   */
  function addCallback($module, $callbackType, $pluginKey, $callback) {
    $this->callbacks[$module][$callbackType][$pluginKey] = $callback;
  }

}

Members

Namesort descending Modifiers Type Description Overrides
crumbs_InjectedAPI_Collection_CallbackCollection::$callbacks protected property Format: $[$module][$callbackType][$pluginKey] = $callback Where $callbackType = 'routeParent'|'routeTitle'|'entityParent'|'entityTitle'.
crumbs_InjectedAPI_Collection_CallbackCollection::addCallback function
crumbs_InjectedAPI_Collection_CallbackCollection::getCallbackOrFalse function