Register the default plugins.

@return $this
779011
public function registerDefaults()
    {
        $requestSubscriber = new RequestSubscriber();
        $this->addSubscriber($requestSubscriber);

        $userAgentHeaderPlugin = new UserAgentHeaderPlugin();
        $this->addSubscriber($userAgentHeaderPlugin);

        return $this;
    }
27928
protected function registerConfig()
    {
        // Config options
        $configIndex = FileConfig::FILE_NAME;
        $configFileName = FileConfig::FILE_NAME.'.php';
        $configPath = __DIR__.'/../../config/'.$configFileName;

        // Publish the config
        $this->publishes([
            $configPath => config_path($configFileName),
        ]);

        // Merge the default config to prevent any crash or unfilled configs
        $this->mergeConfigFrom(
            $configPath,
            $configIndex
        );

        return $this;
    }
62871
def register_plugin(self):
        """"""
        self.focus_changed.connect(self.main.plugin_focus_changed)
        self.main.add_dockwidget(self)
        self.main.console.set_help(self)

        self.internal_shell = self.main.console.shell
        self.console = self.main.console
136628
protected function registerPlugin() {
		$js = [];

		$view = $this->getView();

		CKEditorWidgetAsset::register($view);

		$id = $this->options['id'];

		$options = $this->clientOptions !== false && !empty($this->clientOptions)
			? Json::encode($this->clientOptions)
			: '{}';

		$js[] = "CKEDITOR.replace('$id', $options);";
		$js[] = "mranger.ckeditorWidget.registerOnChangeHandler('$id');";

		if (isset($this->clientOptions['filebrowserUploadUrl'])) {
			$js[] = "mranger.ckeditorWidget.registerCsrfImageUploadHandler();";
		}

		if (!empty($this->externalPlugins)) {
			$baseUrl = Yii::$app->urlManager->baseUrl;

			foreach ($this->externalPlugins as $item) {
				$pluginName = $item['name'];
				$pluginUrl = $item['url'];
				$pluginFileName = $item['fileName'];

				$js[] = "CKEDITOR.plugins.addExternal('$pluginName', '$baseUrl$pluginUrl', '$pluginFileName');";
			}
		}

		$view->registerJs(implode("\n", $js));
	}
404729
def load_default_tc_plugins(self):
        
        for plugin_name, plugin_class in default_plugins.items():
            if issubclass(plugin_class, PluginBase):
                try:
                    self.register_tc_plugins(plugin_name, plugin_class())
                except PluginException as error:
                    self.logger.debug(error)
                    continue
815958
protected function registerDefaultProviders() {

		array_map( function( $provider ) {
			$this->provider( $provider );
		}, [
			AttrServiceProvider::class,
			LanguageServiceProvider::class,
			MetaServiceProvider::class,
			TemplatesServiceProvider::class,
			HierarchyServiceProvider::class,
			ViewServiceProvider::class
		] );
	}
1371397
public function register()
    {
        // Merge our config file with the application's copy of config file, to allow user to
        // just override the configuration that they wanted to make and keep the defaults that are
        // not touched
        $this->mergeConfigFrom(
            __DIR__.'/../../config/pluggables.php', 'pluggables'
        );

        // Register Services
        $this->registerServices();

        // Register Repository
        $this->registerRepository();

        // Register Migrator
        // Once the migrator instance is set, go ahead and register all migration related commands that are
        // used by the artisan commands for easy access
        $this->registerMigrator();

        // Register Console Commands
        $this->registerConsoleCommands();
    }
204716
protected function setDefaults()
  {
    $this->importPaths = array();
    $this->pluginPaths = array();
    $this->sourceMap = self::DEFAULT_SOURCEMAP;
    $this->mapComment = self::DEFAULT_MAPCOMMENT;
    $this->lineNumbers = self::DEFAULT_LINENUMBERS;
    $this->precision = self::DEFAULT_PRECISION;
    $this->style = self::DEFAULT_STYLE;
  }
228746
protected function registerPlugin()
    {
        $view = $this->getView();

        $this->ckeditor = new \skeeks\cms\widgets\formInputs\ckeditor\Ckeditor(ArrayHelper::merge([
            'model' => $this->model,
            'attribute' => $this->attribute,
            'relatedModel' => $this->model,
        ], $this->ckeditorOptions));

        $this->codemirror = new CodemirrorWidget(ArrayHelper::merge([
            'model' => $this->model,
            'attribute' => $this->attribute,

            'preset' => 'htmlmixed',
            'assets' =>
                [
                    \skeeks\widget\codemirror\CodemirrorAsset::THEME_NIGHT
                ],
            'clientOptions' =>
                [
                    'theme' => 'night'
                ],

        ], $this->codemirrorOptions));

        $this->ckeditor->registerAssets();
        $this->codemirror->registerAssets();

        $this->clientOptions['ckeditor'] = $this->ckeditor->clientOptions;
        $this->clientOptions['codemirror'] = $this->codemirror->clientOptions;

        ComboTextInputWidgetAsset::register($this->view);

    }
353229
protected function registerLogs()
    {
        $this->app->singleton('logs', function($app)
        {
            $config = $this->app->config->get('logs');

            if ($config['adapter'] == 'loggly') {

                return new Adapters\Loggly();

            } elseif ($config['adapter'] == 'stackdriver') {

                return new Adapters\Stackdriver();

            } else {

                return new Adapters\Monolog();

            }
            
        });
    }
539338
public function plugins()
    {
        // plugins is a list of arrays, activate on a per plugin base
        if (is_array($this->plugins)) {
            return $this->plugins;
        }

        // for anything the evaluates to true, activate all plugins
        if ($this->plugins) {
            $plugins = apply_filters('all_plugins', get_plugins());

            return array_keys($plugins);
        }

        return [];
    }
1234399
public function registerStandardCommands()
    {
        $welcomeCommand = new WelcomeCommand();

        $this->add($welcomeCommand);
        $this->add(new NewPluginCommand());
        $this->add(new NewPostCommand());
        $this->add(new NewSiteCommand());
        $this->add(new NewThemeCommand());
        $this->add(new SelfUpdateCommand());
        $this->add(new SiteBuildCommand());
        $this->add(new UpdatePluginCommand());
        $this->add(new AddPluginCommand());
        $this->add(new RemovePluginCommand());

        $this->setDefaultCommand($welcomeCommand->getName());
    }
1270979
static public function registerDefaults() {
		if (self::$registeredStatic) {
			require_once __DIR__ . '/Exceptions/RegisterationFailed.php';
			throw new RegistrationFailed('Is already registered');
		}
		
		$loader = new static();
		$loader->registerNamespace('ZExt', __DIR__ . '/..');
		$loader->register();
		
		self::$registeredStatic = true;
		
		return $loader;
	}
756906
protected function configure_defaults() {
		$this->modules        = new \stdClass();
		$this->modules->count = 0;
		$this->installed_dir  = static::dirname( static::$current_file, 1 );
		$this->plugin_basedir = static::dirname( static::$current_file, 2 );
		$assumed_plugin_name  = basename( $this->plugin_basedir );
		$this->plugin_file    = $this->plugin_basedir . '/' . $assumed_plugin_name . '.php';
		$this->wp_plugin_slug = $assumed_plugin_name . '/' . $assumed_plugin_name . '.php';

		if ( is_callable( 'is_plugin_active_for_network' ) ) {
			$this->is_network_active = is_plugin_active_for_network( $this->wp_plugin_slug );
		}

		if ( file_exists( $this->plugin_file ) ) {
			$this->installed_url = plugins_url( '/', $this->plugin_file );
			// Ensure get_plugin_data is available.
			require_once( ABSPATH . 'wp-admin/includes/plugin.php' );
			$this->plugin_data = get_plugin_data( $this->plugin_file, $markup = true, $translate = true );
			if ( is_array( $this->plugin_data ) && isset( $this->plugin_data['Version'] ) ) {
				$this->version = $this->plugin_data['Version'];
			}
		} else {
			$this->installed_url = plugins_url( '/', static::$current_file );
		}
		// Setup network url and fallback in case siteurl is not defined.
		if ( ! defined( 'WP_NETWORKURL' ) && is_multisite() ) {
			define( 'WP_NETWORKURL', network_site_url() );
		} elseif ( ! defined( 'WP_NETWORKURL' ) ) {
			define( 'WP_NETWORKURL', get_site_url() );
		}
		$this->network_url = WP_NETWORKURL;
	}
866676
protected function registerPlugins()
    {
        if (isset($this->clientOptions['plugins']) && count($this->clientOptions['plugins'])) {
            foreach ($this->clientOptions['plugins'] as $plugin) {
                $js = 'plugins/' . $plugin . '/' . $plugin . '.js';
                if (file_exists($this->sourcePath . DIRECTORY_SEPARATOR . $js)) {
                    $this->assetBundle->js[] = $js;
                }
                $css = 'plugins/' . $plugin . '/' . $plugin . '.css';
                if (file_exists($this->sourcePath . DIRECTORY_SEPARATOR . $css)) {
                    $this->assetBundle->css[] = $css;
                }
            }
        }
    }
391340
protected function registerConfiguredServiceProviders()
    {
        $providers = $this->collectConfiguredServiceProviders();

        foreach ($providers as $provider) {
            $this->app->register($provider);
        }

        return $this;
    }
294437
public function registerExtensions()
    {
        // register extensions
        $extensions = $this->servicesByTag('Smarty.Extension', SmartyExtensionInterface::class);

        /**
         * @var $e SmartyExtensionInterface
         */
        if (count($extensions) > 0) {
            $methods = get_class_methods(SmartyExtensionInterface::class);
            foreach ($extensions as $e) {
                foreach ($methods as $m) {
                    if ($m != 'getName') {
                        $plugins = $e->{$m}();
                        foreach ($plugins as $p) {
                            $this->registerPlugin($p);
                        }
                    }
                }
            }
        }
    }