Register an assets json manifest
16999
def register_manifest(app, filename='manifest.json'):
    ''''''
    if current_app.config.get('TESTING'):
        return  # Do not spend time here when testing
    if not has_manifest(app, filename):
        msg = '{filename} not found for {app}'.format(**locals())
        raise ValueError(msg)
    manifest = _manifests.get(app, {})
    manifest.update(load_manifest(app, filename))
    _manifests[app] = manifest
1197474
protected function registerAssets()
    {
        if ($this->hasTitle()) {
            $view = $this->getView();
            AlertAsset::register($view);
            $js = "sweetAlert({$this->getOptions()}, {$this->callback});";
            $view->registerJs($js, $view::POS_END);
        }
    }
1098109
protected function registerAssetFinder() : void {
		$this->app->singleton('basset.finder', function($app) {
			return new AssetFinder($app['files'], $app['config'], base_path() . '/resources/assets');
		});
	}
445260
protected function registerAssets()
    {
        $view = $this->getView();
        SelectizeAsset::register($view);
        $js = '$("#' . $this->getInputId() . '").selectize(' . $this->getPluginOptions() . ');';
        $view->registerJs($js, $view::POS_END);
    }
910370
public function registerAssets()
    {
        $view = $this->getView();

        $asset = NotificationsAsset::register($view);

        // Register the theme assets
        if (!is_null($this->theme)) {
            if (!in_array($this->theme, self::$_builtinThemes)) {
                throw new Exception("Unknown theme: " . $this->theme, 501);
            }
            foreach (['js' => 'registerJsFile', 'css' => 'registerCssFile'] as $type => $method) {
                $filename = NotificationsAsset::getFilename($this->theme, $type);
                if ($filename) {
                    $view->$method($asset->baseUrl . '/' . $filename, [
                        'depends' => NotificationsAsset::className()
                    ]);
                }
            }
        }

        // Register timeago i18n file
        if ($filename = NotificationsAsset::getTimeAgoI18n($this->timeAgoLocale)) {
            $view->registerJsFile($asset->baseUrl . '/' . $filename, [
                'depends' => NotificationsAsset::className()
            ]);
        }

        $params = [
            'url' => Url::to(['/notifications/notifications/poll']),
            'xhrTimeout' => Html::encode($this->xhrTimeout),
            'delay' => Html::encode($this->delay),
            'options' => $this->clientOptions,
            'pollSeen' => !!$this->pollSeen,
            'pollInterval' => Html::encode($this->pollInterval),
            'counters' => $this->counters,
        ];

        if ($this->theme) {
            $params['theme'] = Html::encode($this->theme);
        }

        if ($this->markAllSeenSelector) {
            $params['markAllSeenSelector'] = $this->markAllSeenSelector;
            $params['seenAllUrl'] = Url::to(['/notifications/notifications/read-all']);
        }

        if ($this->deleteAllSelector) {
            $params['deleteAllSelector'] = $this->deleteAllSelector;
            $params['deleteAllUrl'] = Url::to(['/notifications/notifications/delete-all']);
        }

        if ($this->listSelector) {
            $params['seenUrl'] = Url::to(['/notifications/notifications/read']);
            $params['deleteUrl'] = Url::to(['/notifications/notifications/delete']);
            $params['flashUrl'] = Url::to(['/notifications/notifications/flash']);
            $params['listSelector'] = $this->listSelector;
            if ($this->listItemTemplate) {
                $params['listItemTemplate'] = $this->listItemTemplate;
            }
            if ($this->listItemBeforeRender instanceof JsExpression) {
                $params['listItemBeforeRender'] = $this->listItemBeforeRender;
            }
        }

        $js = 'Notifications(' . Json::encode($params) . ');';

        $view->registerJs($js);
    }
324483
protected function registerAssets()
    {
        $view = $this->getView();
        $clientOptions = Json::encode($this->clientOptions);
        $js = 'jQuery("div#' . $this->options['id'] . '").raty(' . $clientOptions . ');';
        $view->registerJs($js);
    }
155869
function() {
                var asset;
                Microloader.updatedAssetsReady = true;

                if (Microloader.updatedManifest) {
                    while (Microloader.removedAssets.length > 0) {
                        asset = Microloader.removedAssets.pop();
                        //<debug>
                            _debug("Asset: " + asset.assetConfig.path + " was removed, un-caching");
                        //</debug>
                        asset.uncache();
                    }

                    if (Microloader.updatedManifest) {
                        //<debug>
                        _debug("Manifest was updated, re-caching");
                        //</debug>
                        Microloader.updatedManifest.cache();
                    }

                    while (Microloader.updatedAssets.length > 0) {
                        asset = Microloader.updatedAssets.pop();
                        //<debug>
                            _debug("Asset: " + asset.assetConfig.path + " was updated, re-caching");
                        //</debug>
                        asset.cache();
                    }

                }

                Microloader.notifyUpdateReady();
            }
1156262
private function registerAssets()
    {
        $al = AssetList::getInstance();
        $al->registerMultiple([
            'jquery/scroll-to' => [
                ['javascript', 'js/jquery.scrollTo.min.js', ['minify' => true, 'combine' => true, 'version' => '2.1.2'], $this],
            ],
            'community_translation/online_translation/bootstrap' => [
                ['javascript', 'js/bootstrap.min.js', ['minify' => false, 'combine' => true], $this],
            ],
            'community_translation/online_translation/markdown-it' => [
                ['javascript', 'js/markdown-it.min.js', ['minify' => false, 'combine' => true], $this],
            ],
            'community_translation/online_translation/core' => [
                ['css', 'css/online-translation.css', ['minify' => false, 'combine' => true], $this],
                ['javascript', 'js/online-translation.js', ['minify' => true, 'combine' => true], $this],
            ],
            'jquery/comtraSortable' => [
                ['css', 'css/jquery.comtraSortable.css', ['minify' => true, 'combine' => true], $this],
                ['javascript', 'js/jquery.comtraSortable.js', ['minify' => true, 'combine' => true], $this],
            ],
        ]);
        $al->registerGroupMultiple([
            'jquery/scroll-to' => [
                [
                    ['javascript', 'jquery'],
                    ['javascript', 'jquery/scroll-to'],
                ],
            ],
            'community_translation/online_translation' => [
                [
                    ['css', 'community_translation/online_translation/core'],
                    ['javascript', 'community_translation/online_translation/bootstrap'],
                    ['javascript', 'community_translation/online_translation/markdown-it'],
                    ['javascript', 'community_translation/online_translation/core'],
                ],
            ],
            'jquery/comtraSortable' => [
                [
                    ['css', 'font-awesome'],
                    ['css', 'jquery/comtraSortable'],
                    ['javascript', 'jquery/comtraSortable'],
                ],
            ],
        ]);
    }
421401
def create_asset(json):
        
        result = Asset(json['sys'])
        file_dict = json['fields']['file']
        result.fields = json['fields']
        result.url = file_dict['url']
        result.mimeType = file_dict['contentType']
        return result
138284
public function registerAssets()
    {
        $view = $this->getView();
        $bundle = SweetalertAsset::register($view);
        $bundle->theme = $this->theme;
    }
1323355
public function registerAssets()
    {
        $view = $this->getView();
        /** @var yii\web\AssetBundle $bandle */
        $bandle = Select2Asset::register($view);
        if ($this->language !== false) {
            $langs[0] = $this->language ? $this->language : Yii::$app->language;
            if (($pos = strpos($langs[0], '-')) > 0) {
                // If "en-us" is not found, try to use "en".
                $langs[1] = substr($langs[0], 0, $pos);
            }
            foreach ($langs as $lang) {
                $langFile = "/js/i18n/{$lang}.js";
                if (file_exists($bandle->sourcePath . $langFile)) {
                    $view->registerJsFile($bandle->baseUrl . $langFile, ['depends' => Select2Asset::className()]);
                    break;
                }
            }
        }
        if ($this->bootstrap) {
            Select2BootstrapAsset::register($view);
        }
        $settings = Json::encode($this->settings);
        $js = "jQuery('#{$this->options['id']}').select2($settings)";
        if ($this->maximize) {
            Select2MaximizeAsset::register($view);
            if (is_integer($this->maximize)) {
                $this->maximize = "{cushion: $this->maximize}";
            } elseif (is_array($this->maximize)) {
                $this->maximize = Json::encode($this->maximize);
            } else {
                $this->maximize = '{}';
            }
            $js .= ".maximizeSelect2Height($this->maximize)";
        }
        foreach ($this->events as $event => $handler) {
            $js .= '.on("' . $event . '", ' . new JsExpression($handler) . ')';
        }
        $view->registerJs("$js;");
    }
243813
public function registerClientScript()
    {
        /* publish assets dir */
        $path = dirname(__FILE__) . DIRECTORY_SEPARATOR . 'assets';
        $assetsUrl = $this->getAssetsUrl($path);

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

        $script = $this->debugMode
            ? 'jquery.sparkline.js'
            : 'jquery.sparkline.min.js';

        $cs->registerScriptFile($assetsUrl . '/js/' . $script);

        /* initialize plugin */
        $selector = '#' . TbArray::getValue('id', $this->htmlOptions, $this->getId());

        $data = CJavaScript::encode($this->data);
        $options = CJavaScript::encode($this->pluginOptions);

        $cs->registerScript(__CLASS__ . '#' . $selector, "jQuery('{$selector}').sparkline({$data}, {$options});");
    }
715353
protected function registerClientScript()
	{
		$assets = Booster::getBooster()->cs;

		$assets->registerPackage('highcharts');

		$baseUrl = $assets->packages['highcharts']['baseUrl'];

		$this->options = CMap::mergeArray(array('exporting' => array('enabled' => true)), $this->options);

		if (isset($this->options['exporting']) && @$this->options['exporting']['enabled']) {
			$assets->registerScriptFile($baseUrl . '/modules/exporting.js');
		}
		if (isset($this->options['theme'])) {
			$assets->registerScriptFile($baseUrl . '/themes/' . $this->options['theme'] . '.js');
		}

		$options = CJavaScript::encode($this->options);

		$assets->registerScript(
			__CLASS__ . '#' . $this->getId(),
			"var highchart{$this->getId()} = new Highcharts.Chart({$options});"
		);
	}
248222
protected function registerClientScripts()
    {
        /* publish assets dir */
        $path = __DIR__ . DIRECTORY_SEPARATOR . '..' . DIRECTORY_SEPARATOR . 'assets';

        $assetsUrl = $this->getAssetsUrl($path);

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

        $cs->registerCssFile($assetsUrl . '/css/easy-pie-chart.css');
        $cs->registerScriptFile($assetsUrl . '/js/jquery.easy.pie.chart.js');

        $options = CJavaScript::encode($this->chartOptions);
        Yii::app()->getClientScript()->registerScript(
            __CLASS__ . '#percent-of-type-operation-simple-pie',
            '$("#' . $this->column->grid->id . ' .' . $this->column->grid->extendedSummaryCssClass . ' .' . $this->chartCssClass . '")
			.easyPieChart(' . $options . ');'
        );

        $this->column->grid->componentsReadyScripts[__CLASS__] =
        $this->column->grid->componentsAfterAjaxUpdate[__CLASS__] =
            '$("#' . $this->column->grid->id . ' .' . $this->column->grid->extendedSummaryCssClass . ' .' . $this->chartCssClass . '")
				.easyPieChart(' . $options . ');';
    }
748235
def install_json(self):
        """"""
        if self._install_json is None:
            try:
                install_json_filename = os.path.join(os.getcwd(), 'install.json')
                with open(install_json_filename, 'r') as fh:
                    self._install_json = json.load(fh)
            except IOError:
                self.log.warning(u'Could not retrieve App Data.')
                self._install_json = {}
        return self._install_json
300850
protected function registerAssets()
    {

        if (\is_array($this->ajaxSettings)) {
            $this->ajaxSettings = explode(',', $this->ajaxSettings);
        }

        $this->view->registerJs(<<<JS
$(document).on('click','button[data-ajax-button-id]', 'click', function() {
    var button = $(this);
    $.ajax({
        url : button.data('ajax-button-url'),
        type : button.data('ajax-button-method'),
        data : button.data('ajax-button-params'),
        {$this->jsCallback($this->errorExpression, 'error')}
        {$this->jsCallback($this->successExpression, 'success')}
        {$this->ajaxSettings}
    });
});
JS
        );
    }
302139
private function registerAssets()
    {
        if ($this->jsNotifier === false) {
            return;
        }

        if (!Yii::$app instanceof \yii\web\Application) {
            return;
        }

        try {
            $view = Yii::$app->getView();
            RavenAsset::register($view);
            $view->registerJs('Raven.config(' . Json::encode($this->publicDsn) . ', ' . Json::encode($this->jsOptions) . ').install();', View::POS_HEAD);
        } catch (Exception $e) {
            // initialize Sentry component even if unable to register the assets
            Yii::error($e->getMessage());
        }
    }