Preload all required events
@return this
12460
function ()
		{
			this.e.log&&this.e.log('Preloading events...','system');
			var preload = {};
			_.merge(preload,this.defaultEvents);
			_.merge(preload,this.getConfig().events);
			if (preload != undefined)
				this.setEvents(preload);
			for (e in preload)
			{
				this.getEvent(e);
			}
			this.attachEventsHandlers();
			return this;
		}
1133992
public static function initialize()
    {
        if (static::$isConfigurationLoaded === true) {
            return;
        }
        
        foreach (static::$handlers as $handler) {
            EventManager::getInstance()->addEventHandler($handler[0], $handler[1], $handler[2], $handler[3]);
        }

        static::$isConfigurationLoaded = true;
    }
951979
protected function startListening()
	{
		foreach ($this->eventsToListenFor as $event) {
			if (is_callable([$this, $event])) {
				$this->connection->eventManager()->bind($event, [$this, $event]);
			}
		}
		return $this;
	}
72716
def preload_pages():
    """"""
    try:
        _add_url_rule([page.url for page in Page.query.all()])
    except Exception:  # pragma: no cover
        current_app.logger.warn('Pages were not loaded.')
        raise
1046271
public function initBlameableEvents()
    {
        $this->on(static::$eventConfirmationChanged, [$this, "onConfirmationChanged"]);
        $this->on(static::$eventNewRecordCreated, [$this, "onInitConfirmation"]);
        $contentTypeAttribute = $this->contentTypeAttribute;
        if (is_string($contentTypeAttribute) && !empty($contentTypeAttribute) && !isset($this->$contentTypeAttribute)) {
            $this->on(static::$eventNewRecordCreated, [$this, "onInitContentType"]);
        }
        $descriptionAttribute = $this->descriptionAttribute;
        if (is_string($descriptionAttribute) && !empty($descriptionAttribute) && !isset($this->$descriptionAttribute)) {
            $this->on(static::$eventNewRecordCreated, [$this, 'onInitDescription']);
        }
        $this->on(static::EVENT_BEFORE_UPDATE, [$this, "onContentChanged"]);
        $this->initSelfBlameableEvents();
    }
1047166
public function loadDefaultElements()
    {
        $this->getOrganizationElement();
        $this->getUserNameElement();
        $this->getPasswordElement();
        $this->getSubmitButton();

        if ($this->showPasswordLost) {
            $this->getLostPasswordElement();
        }
        if ($this->showToken) {
            $this->getTokenElement();
        }

        return $this;
    }
106453
public function setPreload(string $preload = 'none')
    {
        $preloads = [
            'auto',
            'metadata',
            'none'
        ];

        if (! in_array($preload, $preloads)) {
            Throw new ElementException('Prelaod type not supported', 1000);
        }

        $this->attribute['preload'] = $preload;

        return $this;
    }
194195
protected function bindEvents(): void
    {
        $userConfig = $this->app['config'][static::$abstract];

        $handler = new EventHandler($this->app->events, $userConfig);

        $handler->subscribe();

        $handler->subscribeQueueEvents($this->app->queue);

        if (isset($userConfig['send_default_pii']) && $userConfig['send_default_pii'] !== false) {
            $handler->subscribeAuthEvents();
        }
    }
506446
public function boot()
	{
		$path = $this->laravel['path'].'/config/wel.php';

		if (file_exists($path))
		{
			require $path;
		}

		// If the event dispatcher is set on the application, we will fire an event
		// with the Artisan instance to provide each listener the opportunity to
		// register their commands on this application before it gets started.
		if (isset($this->laravel['events']))
		{
			$this->laravel['events']
				->fire('artisan.start', array($this));
		}

		return $this;
	}
1130329
function ()
		{
			this.setConfig({components: this.preload});
			var preload = this.getConfig().components;
			if (preload != undefined)
			{
				this.setComponents(preload);
			}
			return this;
		}
819747
protected function preRun()
    {
        parent::preRun();

        $options = $this->getOptions();

        $this->nmaClient->addApiKey($options['apikey']);

        return $this;
    }
569342
public function init()
    {
        if ($this->initialized) {
            return $this;
        }

        $result = $this->getEventManager()->trigger(self::EVENT_INIT_BEFORE, $this);
        $xml = $result->last();

        // Init before may short circuit init process (i.e. Chaching)
        if (is_string($xml) || ($xml instanceof SimpleXmlElement) || (is_object($xml) && method_exists($xml, '__toString'))) {
            $this->initialized = true;
            return $this->setXml($xml);
        }

        $this->loadXml();
        $this->getEventManager()->trigger(self::EVENT_INIT_AFTER, $this);

        $this->initialized = true;
        return $this;
    }
72727
private function preload(): void
    {
        $iterator = new \RecursiveIteratorIterator(
            new \RecursiveDirectoryIterator(
                __DIR__
            )
        );

        /** @var \SplFileInfo $file */
        foreach ($iterator as $file) {
            if ($file->isFile() && $file->getExtension() === 'php') {
                require_once $file->getRealPath();
            }
        }

        $definedClasses = get_declared_classes();
        /** @var string $definedClass */
        foreach ($definedClasses as $definedClass) {
            try {
                $reflection = new \ReflectionClass($definedClass);
                if ($reflection->implementsInterface(PreloadInterface::class)) {
                    $callback = [$definedClass, 'preload'];
                    assert(is_callable($callback));
                    call_user_func($callback, $this->composer);
                }
            } catch (\ReflectionException $e) {
                continue;
            }
        }
    }
906822
public function preRun(): void {
    $this->insert = $this->getConnection()->insert($this->getTable(), $this->getFields());
  }
620921
protected static function events()
    {
        foreach (self::fetch('app/events', false) as $file) {
            Bus::need($file);
        }
        //
        Event::register();
    }
708654
public function prepare()
    {
        $content = $this->getContent();
        if ($content === null) {
            $this->getFormatter()->format($this);
        } elseif (is_array($content)) {
            $this->prepareMultiPartContent($content);
        }

        $this->isPrepared = true;

        return $this;
    }
92839
public function loadAllPlugins()
    {
        if (count($this->plugins) > 0) {
            foreach ($this->plugins as $plugin_name => $plugin) {
                $event_helpers = $plugin->getEventHelperCallbacks();
                if (count($event_helpers) > 0) {
                    foreach ($event_helpers as $event_name => $callback) {
                        if (!isset($this->events_helpers[$event_name])) {
                            $this->events_helpers[$event_name] = array();
                        }
                        $this->events_helpers[$event_name][] = $plugin; //add the plugin object to the map
                    }
                }
            }

            //register all event helpers
            if (count($this->events_helpers) > 0) {
                foreach ($this->events_helpers as $event_name => $plugin_objs) {
                    if (count($plugin_objs) > 0) {
                        $this->plugin_loading = true;
                        $this->on($event_name, function($event) use ($plugin_objs) {
                            return call_user_func_array(array($event, "register"), $plugin_objs)->start();
                        });
                        $this->plugin_loading = false;
                    }
                }
            }
        }
    }