Register the view finder implementation.

@return void
14510
public function registerViewFinder()
    {
        $self = $this;
        $this->container->singleton('view.finder', function($app) use ($self) {
            $paths = $self->viewPaths;

            return new FileViewFinder($app['files'], $paths);
        });
    }
1042484
private function getViewFinder(): FileViewFinder
    {
        if (!$this->finder) {
            $this->finder = new FileViewFinder(new Filesystem(), [$this->path]);
        }

        return $this->finder;
    }
108389
private function loadViews() {
        if($this->views) {
            return;
        }

        //scan views - and store result in cache
        $cache = $this->getLoops()->getService("cache");
        $key = "Loops-Renderer-".implode("-", $this->view_dir);
        if($cache->contains($key)) {
            $this->views = $cache->fetch($key);
        }
        else {
            foreach($this->view_dir as $view_dir) {
                $this->scanViewDir($view_dir);
            }
            $cache->save($key, $this->views);
        }
    }
876818
public function register()
    {
        //include our view composers, and routes to avoid issues with catch-all routes defined by users
        include __DIR__.'/../../viewComposers.php';
        include __DIR__.'/../../helpers.php';
        
        // Load route with web middleware 
        Route::group([
            'middleware' => 'web',
        ], function () {
            $this->loadRoutesFrom(__DIR__.'/../../routes.php');
        });

        //the admin validator
        $this->app->singleton('admin_validator', function ($app) {
            //get the original validator class so we can set it back after creating our own
            $originalValidator = LValidator::make(array(), array());
            $originalValidatorClass = get_class($originalValidator);

            //temporarily override the core resolver
            LValidator::resolver(function ($translator, $data, $rules, $messages) use ($app) {
                $validator = new Validator($translator, $data, $rules, $messages);
                $validator->setUrlInstance($app->make('url'));

                return $validator;
            });

            //grab our validator instance
            $validator = LValidator::make(array(), array());

            //set the validator resolver back to the original validator
            LValidator::resolver(function ($translator, $data, $rules, $messages) use ($originalValidatorClass) {
                return new $originalValidatorClass($translator, $data, $rules, $messages);
            });

            //return our validator instance
            return $validator;
        });

        //set up the shared instances
        $this->app->singleton('admin_config_factory', function ($app) {
            return new ConfigFactory($app->make('admin_validator'), LValidator::make(array(), array()), config('administrator'));
        });

        $this->app->singleton('admin_field_factory', function ($app) {
            return new FieldFactory($app->make('admin_validator'), $app->make('itemconfig'), $app->make('db'));
        });

        $this->app->singleton('admin_datatable', function ($app) {
            $dataTable = new DataTable($app->make('itemconfig'), $app->make('admin_column_factory'), $app->make('admin_field_factory'));
            $dataTable->setRowsPerPage($app->make('session.store'), config('administrator.global_rows_per_page'));

            return $dataTable;
        });

        $this->app->singleton('admin_column_factory', function ($app) {
            return new ColumnFactory($app->make('admin_validator'), $app->make('itemconfig'), $app->make('db'));
        });

        $this->app->singleton('admin_action_factory', function ($app) {
            return new ActionFactory($app->make('admin_validator'), $app->make('itemconfig'), $app->make('db'));
        });

        $this->app->singleton('admin_menu', function ($app) {
            return new Menu($app->make('config'), $app->make('admin_config_factory'));
        });
    }
11194
protected function bootViews()
    {
        if (isset($this->dir) and isset($this->viewDirs) and is_array($this->viewDirs)) {
            foreach ($this->viewDirs as $dirName => $namespace) {
                $viewPath             = $this->getViewsPath($dirName);
                $viewsDestinationPath = Str::replace($this->viewsDestinationPath, '{namespace}', $namespace);
                $this->loadViewsFrom($viewPath, $namespace);
                $this->publishes([ $viewPath => base_path($viewsDestinationPath) ], 'views');
            }
        }
    }
648870
protected function setViewPaths()
    {
        $viewFinder = $this->app->make('view.finder');

        $themePaths = $this->getAvailableThemePaths();

        if (!empty($themePaths)) {
            $viewFinder->setPaths(array_merge($themePaths, $viewFinder->getPaths()));
        }
    }
715600
protected function registerClient()
    {
        $view = $this->getView();
        TreeViewAsset::register($view);

        $selector = ArrayHelper::remove($this->clientOptions, 'selector', 'ol.sortable');
        $view->registerJs("ns = $('{$selector}').nestedSortable(" . Json::htmlEncode($this->clientOptions) . ");");

        $treeView = $this->options['id'];
        $loading = $this->loadingOptions['id'];
        $view->registerJs(<<<JS
treeView = $('#{$treeView}');
loading = $('#{$loading}');
JS
        );
    }
1086018
public function register()
	{
		// add the install command to the application
		$this->app['bauhaus:scaffold'] = $this->app->share(function($app) {
			return new ScaffoldCommand($app);
		});

		// add the export views command to the application
		$this->app['bauhaus:views:export'] = $this->app->share(function ($app) {
			return new ViewsExportCommand($app);
		});

		// add the generate views command to the application
		$this->app['bauhaus:views:generate'] = $this->app->share(function ($app) {
			return new ViewsGenerateCommand($app);
		});

		$this->commands('bauhaus:scaffold');
		$this->commands('bauhaus:views:export');
		$this->commands('bauhaus:views:generate');
	}
544446
public function registerFactory()
    {
        $this->app->singleton('view', function ($app) {
            // Next we need to grab the engine resolver instance that will be used by the
            // environment. The resolver will be used by an environment to get each of
            // the various engine implementations such as plain PHP or Blade engine.
            $resolver = $app['view.engine.resolver'];

            $finder = $app['view.finder'];

            $factory = $this->createFactory($resolver, $finder, $app['events']);

            // We will also set the container instance on this view environment since the
            // view composers may be classes registered in the container, which allows
            // for great testable, flexible composers for the application developer.
            $factory->setContainer($app);

            $factory->share('app', $app);

            return $factory;
        });
    }
1339445
public function register()
    {
        $app = $this->app;
        $app->view->getEngineResolver()->register(
            'blade.php',
            function () use ($app) {
                    $cachePath = storage_path() . '/views';
                    $compiler  = new LaravelHtmlMinifyCompiler(
                        $app->make('config')->get('laravel-html-minify::config'),
                        $app['files'],
                        $cachePath
                    );

                    return new CompilerEngine($compiler);
            }
        );
        $app->view->addExtension('blade.php', 'blade.php');
    }
1312631
protected function registerViewFinder()
    {
        $container = $this->container;

        $this->container->bindShared('view.finder', function ($app) use ($container) {
            return new FileViewFinder($app['files'], $container['view.paths']);
        });
    }
648655
public function register()
    {
        $this->app->singleton('view', function($app)
        {
            // Next we need to grab the engine resolver instance that will be used by the
            // environment. The resolver will be used by an environment to get each of
            // the various engine implementations such as plain PHP or Blade engine.
            $resolver = $app['view.engine.resolver'];

            $finder = $app['view.finder'];

            $env = new LayoutView($resolver, $finder, $app['events']);

            // We will also set the container instance on this view environment since the
            // view composers may be classes registered in the container, which allows
            // for great testable, flexible composers for the application developer.
            $env->setContainer($app);

            $env->share('app', $app);

            return $env;
        });
    }
872424
public function register()
    {
        $finder = new Finder();
        $finder->files()->name('*.php')->in(__DIR__.'/../../../propel/propel/src/Propel/Generator/Command')->depth(0);

        $commands = [];
        foreach ($finder as $file) {
            $ns = '\\Propel\\Generator\\Command';
            $r  = new \ReflectionClass($ns.'\\'.$file->getBasename('.php'));
            if ($r->isSubclassOf('Symfony\\Component\\Console\\Command\\Command') && !$r->isAbstract()) {
                $c = $r->newInstance();

                $command = 'command.propel.' . $c->getName();
                $commands[] = $command;

                $c->setName('propel:' . $c->getName());
                $c->setAliases([]);
                
                $this->app->singleton(
                    $command, 
                    function ($app) use ($c) {
                        return $c;
                    }
                );
            }
        }

        $commands[] = Commands\CreateSchema::class;

        $this->commands($commands);
    }
140618
public function registerHamlCompiler() {

		// Add resolver
		$this->app['view.engine.resolver']->register('haml', function() {
			return new CompilerEngine($this->app['Bkwld\LaravelHaml\HamlCompiler']);
		});

		// Add extensions
		$this->app['view']->addExtension('haml', 'haml');
		$this->app['view']->addExtension('haml.php', 'haml');
	}
590971
public function init(): void
    {
        if ($this->initialized) {
            return;
        }
        if (!$this->view) {
            $containerGetter = 'get' . ucfirst($this->viewName);
            $this->setView(Container::$containerGetter());
        }
        if (method_exists($this, 'getAvailableHelpers')) {
            $this->registerHelpers($this->getAvailableHelpers());
        }
        
        $this->initialized = true;
    }
760182
public function registerFactory()
    {
        $this->app->singleton('view', function ($app) {
            // Next we need to grab the engine resolver instance that will be used by the
            // environment. The resolver will be used by an environment to get each of
            // the various engine implementations such as plain PHP or Blade engine.
            $resolver = $app['view.engine.resolver'];

            $finder = $app['view.finder'];

            $env = new \Despark\Cms\Illuminate\View\Factory($resolver, $finder, $app['events']);

            // We will also set the container instance on this view environment since the
            // view composers may be classes registered in the container, which allows
            // for great testable, flexible composers for the application developer.
            $env->setContainer($app);

            $env->share('app', $app);

            return $env;
        });
    }
190996
public function registerViews()
	{
		$viewPath = base_path('resources/views/modules/course');

		$sourcePath = __DIR__.'/../Resources/views';

		$this->publishes([
			$sourcePath => $viewPath
		]);

		$this->loadViewsFrom([$viewPath, $sourcePath], 'course');
	}