Captures outline into the ivar on outline BEFORE event.

@param Event $event
336589
private function captureOutlineOnBeforeOutlineEvent(Event $event)
    {
        if (!$event instanceof BeforeOutlineTested) {
            return;
        }

        $this->outline = $event->getOutline();
        $this->headerPrinted = false;
    }
1080037
public function beforeRender(Event $event)
    {
        if ($this->_controller()->getName() === 'Error') {
            return;
        }

        if (!empty($event->getSubject()->entity)) {
            $this->_entity = $event->getSubject()->entity;
        }

        if ($this->associations === null) {
            $this->associations = $this->_associations(array_keys($this->_getRelatedModels()));
        }

        $this->ensureConfig();

        $this->beforeRenderFormType();
        $this->beforeRenderIndexType();
        $this->beforeRenderSiteTitle();
        $this->beforeRenderUtilityNavigation();
        $this->beforeRenderSidebarNavigation();

        $controller = $this->_controller();
        $controller->set('actionConfig', $this->_action()->getConfig());
        $controller->set('title', $this->_getPageTitle());
        $controller->set('breadcrumbs', $this->_getBreadcrumbs());

        $associations = $this->associations;
        $controller->set(compact('associations'));

        $fields = $this->_scaffoldFields($associations);
        $controller->set('fields', $fields);
        $controller->set('formTabGroups', $this->_getFormTabGroups($fields));

        $controller->set('blacklist', $this->_blacklist());
        $controller->set('actions', $this->_getControllerActions());
        $controller->set('bulkActions', $this->_getBulkActions());
        $controller->set('viewblocks', $this->_getViewBlocks());
        $controller->set('actionGroups', $this->_getActionGroups());
        $controller->set($this->_getPageVariables());
    }
7019
public function beforeRun($event)
    {
        $id = $this->owner->options['id'];
        $options = Json::htmlEncode($this->getClientOptions());
        $view = $this->owner->getView();
        GridViewAsset::register($view);
        $view->registerJs("jQuery('#$id').yiiGridView($options);");
    }
1099117
public function onVichUploaderPreUpload(Event $event)
    {
        $media = $event->getObject();

        $this->checkIfThereIsAName($media);
        $this->checkIfNameEverExistInDatabase($media);
        $this->checkIfFileLocationIsChanging($media);
    }
564525
protected function handle(Event $event): void
    {
        $method = 'apply'.ClassName::short($event);

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

        $this->$method($event);
    }
868480
protected function update(Event $event)
    {
        $this->dispatch(static::EVENT_UPDATE_BEFORE, $event);
        if (!$event->isPropagationStopped()) {
            $this->updateProcess($event);
            if (!$event->isPropagationStopped()) {
                $this->dispatch(static::EVENT_UPDATE_AFTER, $event);
            }
        }
    }
804075
protected function handle(Event $event)
    {
        $method = $this->getApplyMethod($event);
        if (!method_exists($this, $method)) {
            return;
        }
        $this->$method($event);
    }
256849
public function beforeRender(Event $event)
    {
        $entity = null;
        if (isset($event->getSubject()->entity)) {
            $entity = $event->getSubject()->entity;
        }
        $this->publishRelatedModels(null, $entity);
    }
1366640
public function beforeRender(Event $event)
    {
        $this->set('authUser', $this->authUser);
        $this->set('title', $this->name);

        $event = new Event('CakeAdmin.Controller.beforeRender', $this);
        EventManager::instance()->dispatch($event);
    }
1271859
private function captureCurrentFeaturePathOnBeforeFeatureEvent(Event $event)
    {
        if (!$event instanceof BeforeFeatureTested) {
            return;
        }

        $this->currentFeaturePath = $event->getFeature()->getFile();
    }
866846
public function setFlash(Event $event)
    {
        unset($event->getSubject()->params['class']);
        $event->getSubject()->element = ltrim($event->getSubject()->type);
    }
906168
private function isBeforeStepEventWithOutput(Event $event)
    {
        if ($event instanceof AfterStepSetup && $event->hasOutput()) {
            $this->stepSetupHadOutput = true;

            return true;
        }

        return false;
    }
1301906
public function afterJavascriptStep($event)
    {
        /** @var \Behat\Behat\Hook\Scope\BeforeStepScope $event */
        if (!$this->hasTag('javascript')) {
            return;
        }
        $text = $event->getStep()->getText();
        if (preg_match('/(follow|press|click|submit)/i', $text)) {
            $this->iWaitForAjaxToFinish($event);
        }
    }
468378
public function beforeUpdate($event)
    {
        foreach ($this->update as $field) {
            $event->sender->$field = time();
        }
    }
761496
public function onViewBeforeRender(Event $event)
    {
        /**
         * @var Container $container
         * @var Profiler  $profiler
         */
        $container = $event['view']->getPackage()->getContainer();
        $profiler  = $container->get('profiler');

        $name = $event['view']->getPackage()->name . '@' . $event['view']->getName();

        $profiler->mark(__FUNCTION__ . ' / ' . $name . ' (' . uniqid() . ')', [
            'tag' => 'package.process',
        ]);
    }
570929
public function beforeDispatch(Event $event)
    {
        $request = $event->getData('request');
        $response = $event->getData('response');
        $event->setData('controller', $this->_getController($request, $response));
    }
776725
public function beforePrepare(Event $event)
	{
		$operation = $event['command']->getOperation();
		$client = $event['command']->getClient();

		if ($operation->hasParam('collection') === false) return;
		if (is_null($client->getCollectionName())) return;

		$operation->getParam('collection')->setDefault($client->getCollectionName());
		$operation->getParam('collection')->setStatic(true);

	}