original_string: public function runAjaxHandler($handler)
      {
          /**
           * @event cms.component.beforeRunAjaxHandler
           * Provides an opportunity to modify an AJAX request to a component before it is processed by the component
           *
           * The parameter provided is `$handler` (the requested AJAX handler to be run)
           *
           * Example usage (forwards AJAX handlers to a backend widget):
           *
           *     Event::listen('cms.component.beforeRunAjaxHandler', function((\Cms\Classes\ComponentBase) $component, (string) $handler) {
           *         if (strpos($handler, '::')) {
           *             list($componentAlias, $handlerName) = explode('::', $handler);
           *             if ($componentAlias === $this->getBackendWidgetAlias()) {
           *                 return $this->backendControllerProxy->runAjaxHandler($handler);
           *             }
           *         }
           *     });
           *
           * Or
           *
           *     $this->controller->bindEvent('component.beforeRunAjaxHandler', function ((string) $handler) {
           *         if (strpos($handler, '::')) {
           *             list($componentAlias, $handlerName) = explode('::', $handler);
           *             if ($componentAlias === $this->getBackendWidgetAlias()) {
           *                 return $this->backendControllerProxy->runAjaxHandler($handler);
           *             }
           *         }
           *     });
           *
           */
          if ($event = $this->fireSystemEvent('cms.component.beforeRunAjaxHandler', [$handler])) {
              return $event;
          }
  
          $result = $this->$handler();
  
          /**
           * @event cms.component.runAjaxHandler
           * Provides an opportunity to modify an AJAX request to a component after it is processed by the component
           *
           * The parameters provided are `$handler` (the requested AJAX handler to be run) and `$result` (the result of the component processing the request)
           *
           * Example usage (Logs requests and their response):
           *
           *     Event::listen('cms.component.beforeRunHandler', function((\Cms\Classes\ComponentBase) $component, (string) $handler, (mixed) $result) {
           *         if (in_array($handler, $interceptHandlers)) {
           *             return 'request has been intercepted, original response: ' . json_encode($result);
           *         }
           *     });
           *
           * Or
           *
           *     $this->controller->bindEvent('componenet.beforeRunAjaxHandler', function ((string) $handler, (mixed) $result) {
           *         if (in_array($handler, $interceptHandlers)) {
           *             return 'request has been intercepted, original response: ' . json_encode($result);
           *         }
           *     });
           *
           */
          if ($event = $this->fireSystemEvent('cms.component.runAjaxHandler', [$handler, $result])) {
              return $event;
          }
  
          return $result;
      }
code: public function runAjaxHandler($handler)
      {
          /**
           * @event cms.component.beforeRunAjaxHandler
           * Provides an opportunity to modify an AJAX request to a component before it is processed by the component
           *
           * The parameter provided is `$handler` (the requested AJAX handler to be run)
           *
           * Example usage (forwards AJAX handlers to a backend widget):
           *
           *     Event::listen('cms.component.beforeRunAjaxHandler', function((\Cms\Classes\ComponentBase) $component, (string) $handler) {
           *         if (strpos($handler, '::')) {
           *             list($componentAlias, $handlerName) = explode('::', $handler);
           *             if ($componentAlias === $this->getBackendWidgetAlias()) {
           *                 return $this->backendControllerProxy->runAjaxHandler($handler);
           *             }
           *         }
           *     });
           *
           * Or
           *
           *     $this->controller->bindEvent('component.beforeRunAjaxHandler', function ((string) $handler) {
           *         if (strpos($handler, '::')) {
           *             list($componentAlias, $handlerName) = explode('::', $handler);
           *             if ($componentAlias === $this->getBackendWidgetAlias()) {
           *                 return $this->backendControllerProxy->runAjaxHandler($handler);
           *             }
           *         }
           *     });
           *
           */
          if ($event = $this->fireSystemEvent('cms.component.beforeRunAjaxHandler', [$handler])) {
              return $event;
          }
  
          $result = $this->$handler();
  
          /**
           * @event cms.component.runAjaxHandler
           * Provides an opportunity to modify an AJAX request to a component after it is processed by the component
           *
           * The parameters provided are `$handler` (the requested AJAX handler to be run) and `$result` (the result of the component processing the request)
           *
           * Example usage (Logs requests and their response):
           *
           *     Event::listen('cms.component.beforeRunHandler', function((\Cms\Classes\ComponentBase) $component, (string) $handler, (mixed) $result) {
           *         if (in_array($handler, $interceptHandlers)) {
           *             return 'request has been intercepted, original response: ' . json_encode($result);
           *         }
           *     });
           *
           * Or
           *
           *     $this->controller->bindEvent('componenet.beforeRunAjaxHandler', function ((string) $handler, (mixed) $result) {
           *         if (in_array($handler, $interceptHandlers)) {
           *             return 'request has been intercepted, original response: ' . json_encode($result);
           *         }
           *     });
           *
           */
          if ($event = $this->fireSystemEvent('cms.component.runAjaxHandler', [$handler, $result])) {
              return $event;
          }
  
          return $result;
      }
code_tokens: public function runAjaxHandler ( $ handler ) { /**
           * @event cms.component.beforeRunAjaxHandler
           * Provides an opportunity to modify an AJAX request to a component before it is processed by the component
           *
           * The parameter provided is `$handler` (the requested AJAX handler to be run)
           *
           * Example usage (forwards AJAX handlers to a backend widget):
           *
           *     Event::listen('cms.component.beforeRunAjaxHandler', function((\Cms\Classes\ComponentBase) $component, (string) $handler) {
           *         if (strpos($handler, '::')) {
           *             list($componentAlias, $handlerName) = explode('::', $handler);
           *             if ($componentAlias === $this->getBackendWidgetAlias()) {
           *                 return $this->backendControllerProxy->runAjaxHandler($handler);
           *             }
           *         }
           *     });
           *
           * Or
           *
           *     $this->controller->bindEvent('component.beforeRunAjaxHandler', function ((string) $handler) {
           *         if (strpos($handler, '::')) {
           *             list($componentAlias, $handlerName) = explode('::', $handler);
           *             if ($componentAlias === $this->getBackendWidgetAlias()) {
           *                 return $this->backendControllerProxy->runAjaxHandler($handler);
           *             }
           *         }
           *     });
           *
           */ if ( $ event = $ this -> fireSystemEvent ( 'cms.component.beforeRunAjaxHandler' , [ $ handler ] ) ) { return $ event ; } $ result = $ this -> $ handler ( ) ; /**
           * @event cms.component.runAjaxHandler
           * Provides an opportunity to modify an AJAX request to a component after it is processed by the component
           *
           * The parameters provided are `$handler` (the requested AJAX handler to be run) and `$result` (the result of the component processing the request)
           *
           * Example usage (Logs requests and their response):
           *
           *     Event::listen('cms.component.beforeRunHandler', function((\Cms\Classes\ComponentBase) $component, (string) $handler, (mixed) $result) {
           *         if (in_array($handler, $interceptHandlers)) {
           *             return 'request has been intercepted, original response: ' . json_encode($result);
           *         }
           *     });
           *
           * Or
           *
           *     $this->controller->bindEvent('componenet.beforeRunAjaxHandler', function ((string) $handler, (mixed) $result) {
           *         if (in_array($handler, $interceptHandlers)) {
           *             return 'request has been intercepted, original response: ' . json_encode($result);
           *         }
           *     });
           *
           */ if ( $ event = $ this -> fireSystemEvent ( 'cms.component.runAjaxHandler' , [ $ handler , $ result ] ) ) { return $ event ; } return $ result ; }
docstring: Executes the event cycle when running an AJAX handler.
  @return boolean Returns true if the handler was found. Returns false otherwise.
docstring_tokens: Executes the event cycle when running an AJAX handler .