Initializes BreadcrumbComponent for use in the controller.

@param Event $event The event that was triggered
@return void
438043
public function beforeFilter(Event $event)
    {
        $this->_controller = $event->subject();
        $this->_controller->helpers['Breadcrumb'] = ['className' => 'Menu\View\Helper\BreadcrumbHelper'];
    }
1163467
protected function commandStartingHandler(CommandStarting $event)
    {
        if ($event->command) {
            Integration::configureScope(function (Scope $scope) use ($event): void {
                $scope->setTag('command', $event->command);
            });

            Integration::addBreadcrumb(new Breadcrumb(
                Breadcrumb::LEVEL_INFO,
                Breadcrumb::TYPE_USER,
                'artisan.command',
                'Invoked Artisan command: ' . $event->command,
                method_exists($event->input, '__toString') ? [
                    'input' => (string)$event->input,
                ] : []
            ));
        }
    }
1245293
public function beforeFilter($event)
    {
        $this->setController($event->subject());

        if ($this->Controller->Manager->prefix('admin')) {
            if (method_exists($this->Controller, 'initPostTypes')) {
                $this->Controller->initPostTypes($event);
            }
        }
    }
804075
protected function handle(Event $event)
    {
        $method = $this->getApplyMethod($event);
        if (!method_exists($this, $method)) {
            return;
        }
        $this->$method($event);
    }
537245
public function beforeRender(Event $event)
    {
        parent::beforeRender($event);

        $this->set('type', $this->type);
        $this->set('title', $this->type['name']);
    }
1215958
public function bindPluginEvents(Event $event)
    {
        foreach ($this->plugins as $field => $plugin) {
            $plugin = self::findPluginInstance($field, $plugin, $event->sender->tableName());
            foreach ($plugin->events() as $on => $handler) {
                $event->sender->on($on, is_string($handler) ? [$plugin, $handler] : $handler);
            }
        }
    }
115023
public function beforeFilter(\Cake\Event\Event $event)
    {
        parent::beforeFilter($event);

        $this->loadModel('Settings.Configurations');

        $this->prefixes = Configure::read('Settings.Prefixes');

        $this->Menu->active('ca.settings');
        $this->Menu->area('navbar');

        foreach ($this->prefixes as $prefix => $alias) {
            $this->Menu->add($alias, [
                'url' => [
                    'action' => 'index', $prefix,
                ]
            ]);
        }
    }
534772
public function onInitCache($event)
    {
        $sender = $event->sender;
        $data = $event->data;
        if (isset($data['prefix'])) {
            $sender->cachePrefix = $data['prefix'];
        } else {
            $sender->cachePrefix = $sender::className();
        }
    }
487811
public function onConsoleCommand(ConsoleCommandEvent $event): void
    {
        $command = $event->getCommand();

        Hub::getCurrent()
            ->configureScope(function (Scope $scope) use ($command): void {
                $scope->setTag('command', $command ? $command->getName() : 'N/A');
            });
    }
993351
public static function init($event = null)
    {
        if ($event) {
            self::$_event = $event;
        } else {
            pcntl_signal(SIGALRM, array('\Workerman\Lib\Timer', 'signalHandle'), false);
        }
    }
1271440
public function startup(Event $event) {
		$layout = $this->request->getSession()->read('Setup.layout');
		if ($layout) {
			$this->Controller->viewBuilder()->setLayout($layout);
		}
	}
833627
public function handleRecursively(Event $event): void
    {
        $this->handle($event);

        foreach ($this->childEntities() as $entity) {
            $entity->registerAggregateRoot($this->getAggregateRoot());
            $entity->handleRecursively($event);
        }
    }
866846
public function setFlash(Event $event)
    {
        unset($event->getSubject()->params['class']);
        $event->getSubject()->element = ltrim($event->getSubject()->type);
    }
430788
public function beforeRender(Event $event)
    {
        parent::beforeRender($event);

        $this->set('title', $this->Settings['alias']);
    }
375158
public function add($event) {
        $event->setParent($this->_parent);
        $this->_events[$event->getName()] = $event;
    }
49109
protected function handle($event): void
    {
        $method = $this->getApplyMethod($event);

        if (!method_exists($this, $method)) {
            return;
        }

        $this->$method($event);
    }
810820
public function fireEvent(string $event): void
    {
        $this->log->debug('Event {event} has been fired.', ['event' => $event]);
        foreach ($this->event_handlers as $handler) {
            /** @var EventHandler $handler */
            if ($event === $handler->getEvent()) {
                $handler->execute();
            }
        }
    }