Read from config which css and js files to load, and add them to the output.
If `AssetCompress` plugin is loaded, use the `asset_compress.ini` configuration
that is part of this plugin.

@return void
175769
protected function _loadAssets()
    {
        if (Configure::read('CrudView.useAssetCompress')) {
            $this->AssetCompress->css('CrudView.crudview', ['block' => true]);
            $this->AssetCompress->script('CrudView.crudview_head', ['block' => 'headjs']);
            $this->AssetCompress->script('CrudView.crudview', ['block' => true]);

            return;
        }

        $config = Configure::read('CrudView');
        if (!$config) {
            return;
        }

        if (!empty($config['css'])) {
            $this->Html->css($config['css'], ['block' => true]);
        }

        if (!empty($config['js'])) {
            foreach ($config['js'] as $block => $scripts) {
                $this->Html->script($scripts, ['block' => $block]);
            }
        }
    }
542985
private function loadConfig()
	{
		$this->initialConfig = new Config(__APP_CONFIG_PROD);
		$this->config = clone $this->initialConfig;

		if ($this->component !== false && $this->component->hasConfig()) {
			$componentconfig = new Config($this->component->getConfigPath());
			if ($this->component->getMergeDefaultConfig()) {
				$this->config->merge($componentconfig);
			} else {
				$this->config = $componentconfig;
			}
		}
	}
1277524
protected function loadConfig()
    {
        $this->hook->trigger(self::HOOK_LOAD_CONFIG_BEFORE);
        $this->config->load();
        $this->hook->trigger(self::HOOK_LOAD_CONFIG_AFTER);
    }
685906
public function loadPluginAssets()
    {
        $plugin = (string) $this->request->getParam('plugin');
        $prefix = ($this->request->getParam('prefix')) ? $this->request->getParam('prefix') . '/' : null;
        $action = (string) $this->request->getParam('action');

        $controller = (string) $this->request->getParam('controller');
        $widgetName = Str::slug($controller . '-' . $action) . '.js';
        $cssOptions = ['block' => 'css_bottom', 'fullBase' => true, 'force' => Configure::read('debug')];

        $this->Html->css($plugin . '.' . $prefix . 'styles.css', $cssOptions);
        $this->Html->less($plugin . '.' . $prefix . 'styles.less', $cssOptions);
        $this->Html->script([
            $plugin . '.' . $prefix . 'widget/' . $widgetName,
            $plugin . '.' . $prefix . 'script.js'
        ], ['block' => 'script_bottom', 'fullBase' => true]);
    }
696225
public function loadConfigurations(): void
	{
		foreach ($this->plugins as $plugin) {
			$plugin['inst']->setupPlugin($plugin['config']);
			$plugin['inst']->loadPluginConfiguration();
		}
	}
581239
protected function initConfig(): void
    {
        $configFile = $this->getRootRelatedPath($this->getConfigFileName());

        $this->assertFileIsReadable($configFile);

        self::$config = (array)(include $configFile);
    }
1006665
public function loadFiles($assets)
    {
        foreach ($assets as $type => $item) {
            $addMethod = 'load' . ucfirst($type);

            if (method_exists($this, $addMethod)) {
                call_user_func_array([&$this, $addMethod], [$item]);
            }
        }
    }
218057
public function initialize()
    {
        if (true == $this->initialized) {
            return;
        }

        $this->initialized = true;
        
        if ($this->isEnabled()) {
            $headScript = $this->getView()->plugin('headScript');
            
            $headScript->prependFile($this->src);
            
            $options = array();
            foreach (array('async', 'parseOnLoad') as $property) {
                if (null !== $this->$property) {
                    $options[$property] = $this->$property;
                }
            }
            if (!empty($this->packages)) {
                $options['packages'] = array_values($this->packages);
            }
            if (!empty($options)) {
                $headScript->prependScript("dojoConfig=" . json_encode($options) . ";");
            }
            if (!empty($this->modules)) {
                $require = 'require(["' . implode('", "', $this->modules) . '"]);';
                $headScript->appendScript($require);
            }
        }
    }
914543
protected function loadAssets()
    {
        $assets = $this->assetsObjectBackend->loadObject();
        if (!is_array($assets)) {
            $assets = array();
        }
        
        $this->assets = $assets;
    }
1297272
protected function addStyleSheets()
	{
		// Initialize string for .css path
		$path = '';

		// Get .css path if defined in config file
		if ($this->getConfig('assets.paths.css'))
		{
			$path = $this->getConfig('assets.paths.css') . '/';
		}

		foreach ($this->stylesheets as $file => $options)
		{
			// Set default value for median attribute
			$media = 'all';

			// Set default value for conditional comments
			$cond = '';

			// Check in config file if stylesheet is an external resource
			$cdn = $this->getConfig('assets.cdn.'.$file);

			// Initialize string for file's url
			$href = '';

			// No conditional comment
			if (is_string($options) && $options)
			{
				$media = $options;
			}

			// Conditional comments are defined
			elseif(is_array($options))
			{
				// Check if value is not empty
				if (array_key_exists(1, $options) && $options[1])
				{
					// Get value for conditional comments
					$cond = $options[1];
				}

				// Check if value is not empty
				if (array_key_exists(0, $options) && $options[0])
				{
					// Get value for media attribute
					$media = $options[0];
				}
			}

			// Stylesheet is an external resource
			if ($cdn)
			{
				// Get file's url
				$href = $cdn;
			}

			// Stylesheet is a local resources + check if file exists
			elseif (File::exists(public_path($path.$file.'.css')))
			{
				// Get file's url
				$href = asset($path.$file.'.css');
			}

			// Check if url is not empty
			if ($href)
			{
				// Register link tag for this stylesheet
				$this->addOneLink('stylesheet', $href, '', array('media' => $media), $cond);
			}
		}
	}
613487
public function init()
	{
		$asset = Yii::app()->assetManager->publish(YiiBase::getPathOfAlias('cii.assets.dist'), true, -1, YII_DEBUG);

		// Register CSS and Scripts
		Yii::app()->clientScript->registerScriptFile($asset. (YII_DEBUG ? '/ciimscomments.js' : '/ciimscomments.min.js'), CClientScript::POS_END);
		Yii::app()->clientScript->registerCssFile($asset. (YII_DEBUG ? '/ciimscomments.css' : '/ciimscomments.min.css'));
		
		if ($this->content != false)
			$this->renderCommentBox();
		else
			$this->renderCommentCount();
	}
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);
            }
        }
    }
1316715
public static function init() {
		
		// make sure config vars exist
		if (!Config::getOption("patternExtension")) {
			Console::writeError("the pattern extension config option needs to be set...");
		}
		
		if (!Config::getOption("styleguideKit")) {
			Console::writeError("the styleguideKit config option needs to be set...");
		}
		
		// set-up config vars
		$patternExtension        = Config::getOption("patternExtension");
		$metaDir                 = Config::getOption("metaDir");
		$styleguideKit           = Config::getOption("styleguideKit");
		$styleguideKitPath       = Config::getOption("styleguideKitPath");
		
		if (!$styleguideKitPath || !is_dir($styleguideKitPath)) {
			Console::writeError("your styleguide won't render because i can't find your styleguide files. are you sure they're at <path>".Console::getHumanReadablePath($styleguideKitPath)."</path>? you can fix this in <path>./config/config.yml</path> by editing styleguideKitPath...");
		}
		
		// load pattern-lab's resources
		$partialPath             = $styleguideKitPath.DIRECTORY_SEPARATOR."views".DIRECTORY_SEPARATOR."partials";
		$generalHeaderPath       = $partialPath.DIRECTORY_SEPARATOR."general-header.".$patternExtension;
		$generalFooterPath       = $partialPath.DIRECTORY_SEPARATOR."general-footer.".$patternExtension;
		self::$htmlHead          = (file_exists($generalHeaderPath)) ? file_get_contents($generalHeaderPath) : "";
		self::$htmlFoot          = (file_exists($generalFooterPath)) ? file_get_contents($generalFooterPath) : "";
		
		// gather the user-defined header and footer information
		$patternHeadPath         = $metaDir.DIRECTORY_SEPARATOR."_00-head.".$patternExtension;
		$patternFootPath         = $metaDir.DIRECTORY_SEPARATOR."_01-foot.".$patternExtension;
		self::$patternHead       = (file_exists($patternHeadPath)) ? file_get_contents($patternHeadPath) : "";
		self::$patternFoot       = (file_exists($patternFootPath)) ? file_get_contents($patternFootPath) : "";
		
		// add the filesystemLoader
		$patternEngineBasePath   = PatternEngine::getInstance()->getBasePath();
		$filesystemLoaderClass   = $patternEngineBasePath."\Loaders\FilesystemLoader";
		
		$options                 = array();
		$options["templatePath"] = $styleguideKitPath.DIRECTORY_SEPARATOR."views";
		$options["partialsPath"] = $options["templatePath"].DIRECTORY_SEPARATOR."partials";
		
		self::$filesystemLoader  = new $filesystemLoaderClass($options);
		
		$stringLoaderClass       = $patternEngineBasePath."\Loaders\StringLoader";
		self::$stringLoader      = new $stringLoaderClass();
		
		// i can't remember why i chose to implement the pattern loader directly in classes
		// i figure i had a good reason which is why it's not showing up here
		
	}
931508
protected function handleAssets()
    {
        $assetHandlerConnectorManager = $this->getAssetHandlerConnectorManager();

        // Default FormZ assets.
        $assetHandlerConnectorManager->includeDefaultAssets();

        // JavaScript assets.
        $assetHandlerConnectorManager->getJavaScriptAssetHandlerConnector()
            ->generateAndIncludeFormzConfigurationJavaScript()
            ->generateAndIncludeJavaScript()
            ->generateAndIncludeInlineJavaScript()
            ->includeJavaScriptValidationAndConditionFiles();

        // CSS assets.
        $assetHandlerConnectorManager->getCssAssetHandlerConnector()
            ->includeGeneratedCss();
    }
1165461
public function autoload($assets)
    {
        foreach ($assets as $position => $collections) {
            if (property_exists($this, $position)) {

                if ($collections instanceof \ArrayObject) {
                    $collections = $collections->getArrayCopy();
                }

                $this->{$position}->loadCollections($collections);
            } elseif ($position === 'packages') {
                $this->loadPackages($collections);
            } elseif ($position === 'css') {
                $this->loadCss($collections);
            } elseif ($position === 'js') {
                $this->loadJs($collections);
            }
        }
    }
1013648
private final function loadConfig(): void
    {
        $this->config = new Config();

        $file = sprintf('%s/app/service/%s/config/config.php', APP_DIR, $this->name);
        if (file_exists($file) && is_array($data = include $file)) {
            $this->config->setData($data);
        }
    }
1229599
public function loadConfig()
    {
        parent::loadConfig();
        foreach(Config::get('@' . $this->moduleName . '.configs', []) as $name => $fileName)
        {
            Config::addConfig($name, include $fileName);
        }
    }