Register assets manager.

@author Casper Rasmussen <cr@nodes.dk>
@return void
515339
public function registerManager()
    {
        $this->app->singleton('nodes.assets', function ($app) {
            $uploadProvider = call_user_func(config('nodes.assets.general.upload.provider'), $app);
            $urlProvider = call_user_func(config('nodes.assets.general.url.provider'), $app);

            return new Manager($uploadProvider, $urlProvider);
        });
    }
995761
protected function registerAssetSymlinker()
    {
//        $this->app->singleton('asset.symlinker', function() {
//            $publicPath = sandbox_path('packages/antares');
//
//            return new AssetSymlinker(new Filesystem, $publicPath);
//        });

        $this->app->singleton(AssetSymlinker::class, function() {
            $publicPath = sandbox_path('packages/antares');

            return new AssetSymlinker(new Filesystem, $publicPath);
        });

        $this->app->alias(AssetSymlinker::class, 'asset.symlinker');
    }
1098800
public function registerAssets()
    {
        $this->clientOptions = array_merge([
            'id' => $this->options['id'],
            'url' => Url::to(['/notifications/default/list']),
            'countUrl' => Url::to(['/notifications/default/count']),
            'readUrl' => Url::to(['/notifications/default/read']),
            'readAllUrl' => Url::to(['/notifications/default/read-all']),
            'xhrTimeout' => Html::encode($this->xhrTimeout),
            'pollInterval' => Html::encode($this->pollInterval),
        ], $this->clientOptions);

        $js = 'Notifications(' . Json::encode($this->clientOptions) . ');';
        $view = $this->getView();

        NotificationsAsset::register($view);

        $view->registerJs($js);
    }
805212
protected function registerAssetPublisher(): void
    {
        $this->app->singleton('asset.publisher', function (Application $app) {
            $publicPath = $app->publicPath();

            // The asset "publisher" is responsible for moving package's assets into the
            // web accessible public directory of an application so they can actually
            // be served to the browser. Otherwise, they would be locked in vendor.
            $publisher = new Asset($app->make('files'), $publicPath);

            $publisher->setPackagePath($app->basePath().'/vendor');

            return $publisher;
        });
    }
996402
protected function registerAssets()
    {
        // If we have to hide the deleted comments, we will define the javascript
        // to destroy the comment instead of the default functionality.
        if ($this->showDeletedComments === FALSE)
        {
            $this->clientOptions['deleteComment'] = TRUE;
        }

        $view = $this->getView();
        $options = Json::encode($this->clientOptions);
        CommentAsset::register($view);
        $view->registerJs('jQuery.comment(' . $options . ');');
    }
450018
public function register()
    {
        $this->app->singleton('orchestra.avatar', function (Application $app) {
            $manager = new AvatarManager($app);
            $namespace = $this->hasPackageRepository() ? 'orchestra/avatar::' : 'orchestra.avatar';

            $manager->setConfig($app->make('config')->get($namespace));

            return $manager;
        });
    }
579212
public function register()
    {
        $this->app->instance('metabox', $metaBoxManager = new Manager($this->app, $this->app['actions']));
    }
613322
public function registerAssets()
    {
        $config = Yii::$app->wechat->js->config($this->apiList);
        $view = $this->getView();
        WechatAsset::register($view);
        $view->registerJs("wx.config({$config});wx.error(function(res){console.error(res.errMsg);});wx.ready(function (){console.info('wechat jssdk init.');});", View::POS_END);
    }
798498
public function register()
    {
        $this->app['asset'] = $this->app->share(function () {
            return new Asset();
        });

        $this->app['command.asset.warm'] = $this->app->share(function () {
            return new AssetWarmCommand();
        });

        $this->commands('command.asset.warm');
    }
1188520
public function registerAssets()
    {
        if ($this->cssAssets)
        {
            foreach($this->cssAssets as $asset)
            {
                $this->assetLoader->registerCssAsset($asset);
            }
        }

        if ($this->jsAssets)
        {
            foreach($this->jsAssets as $asset)
            {
                $this->assetLoader->registerJsAsset($asset);
            }
        }
    }
1187926
public function register()
    {
        $this->app->singleton('asset', function ($app, $parameters = []) {
            if (count($parameters) < 2) {
                $parameters = array_merge($parameters, [null]);
            }
            list($dir, $path) = $parameters;

            return new Asset($dir, $path);
        });

        $this->app->bind('manifest', function ($app, $parameters = []) {
            if (count($parameters) < 2) {
                $parameters = array_merge($parameters, [null]);
            }
            list($dir, $path) = $parameters;

            return new Manifest($dir, $path);
        });

        // TODO: Allow to register or not Larasset commands in production env with a config option
        if ($this->app->environment() !== 'production' && $this->app['config']->get('app.debug')) {
            // For security reasons Larasset commands aren't available in production environment
            $this->registerCommands();
        }

        // TODO: Allow to publish default package.json in the config path of the package
    }
801478
public function registerGalleryScriptFiles()
    {
        /* publish assets dir */
        $path = dirname(__FILE__) . DIRECTORY_SEPARATOR . 'assets';
        $assetsUrl = $this->getAssetsUrl($path);

        /* @var $cs CClientScript */
        $cs = Yii::app()->getClientScript();

        $cs->registerScriptFile($assetsUrl . '/js/blueimp-gallery.min.js', CClientScript::POS_END);
        $cs->registerScriptFile($assetsUrl . '/js/blueimp-gallery-indicator.js', CClientScript::POS_END);
        $cs->registerCssFile($assetsUrl . '/css/blueimp-gallery.min.css');
    }
383943
protected function registerAssets()
    {
        $view = $this->getView();
        IonSliderAsset::register($view);
        $view->registerJs('$("#' . $this->options['id'] . '").ionRangeSlider(' . $this->getPluginOptions() . ');');
    }
531783
public function register()
    {
        // Register the Artisan command binding
        $this->app->bind('stolz.assets.command.flush', function ($app) {
            return new FlushPipelineCommand();
        });
        // Merge user's configuration with the default package config file
        //$this->mergeConfigFrom(__DIR__ . '/config.php', 'assets');
        $config = $this->app['config']->get('assets.groups', []);
        // Register the library instances bindings ...
        // No groups defined. Assume the config is for the default group.
        if (! isset($config['default'])) {
            return $this->registerAssetsManagerInstance('default', $config);
        }
        // Multiple groups
        foreach ($config as $groupName => $groupConfig) {
            $this->registerAssetsManagerInstance($groupName, (array) $groupConfig);
        }
    }
21868
private function _registerAssets()
    {
        if ($this->frontendTranslationAsset) {
            Yii::$app->view->registerAssetBundle($this->frontendTranslationAsset);
        }

        if ($this->frontendTranslationPluginAsset) {
            Yii::$app->view->registerAssetBundle($this->frontendTranslationPluginAsset);
        }
    }
1304006
public function register()
    {
        foreach (array_keys($this->generators) as $command) {
            $class = "Orchestra\\Studio\\Console\\{$command}Command";
            $name  = $this->generators[$command];

            $this->app->singleton($name, $class);
        }

        $this->commands(array_values($this->generators));
    }
687232
protected function registerAsset(): void
    {
        $this->app->singleton('orchestra.asset', function (Application $app) {
            return new Factory($app->make('orchestra.asset.dispatcher'));
        });
    }