Inject JS dependencies to the HTML helper

@return void
162206
public function addDependencies()
    {
        $this->Html->script('/attachments/js/vendor/jquery.ui.widget.js', ['block' => true]);
        $this->Html->script('/attachments/js/vendor/jquery.iframe-transport.js', ['block' => true]);
        $this->Html->script('/attachments/js/vendor/jquery.fileupload.js', ['block' => true]);
        $this->Html->script('/attachments/js/app/lib/AttachmentsWidget.js', ['block' => true]);
        $this->Html->css('/attachments/css/attachments.css', ['block' => true]);
    }
164083
public function beforeCompile(): void
	{
		// Skip if it's not CLI mode
		if (!$this->cliMode) return;

		$builder = $this->getContainerBuilder();

		// Lookup for Symfony Console Application
		$application = $builder->getDefinitionByType('Symfony\Component\Console\Application');

		// Register helpers
		$connectionHelper = $this->prefix('@connectionHelper');
		$application->addSetup(new Statement('$service->getHelperSet()->set(?, ?)', [$connectionHelper, 'db']));
	}
589211
function inject_script_shim () {
      if (options.include_js) {
        var script_tag = '<script type="text/javascript" src="' + options.include_js + '"></script>';
        if (options.js_insert_marker && html.indexOf(options.js_insert_marker) !== -1) {
          html = html.replace(options.js_insert_marker, script_tag);
        }
        else {
          var shims = ["</body>", "</html>", "</head>"];
          inject(script_tag, shims);
        }
      }
    }
241578
public function compile(JsUtils $js = NULL, &$view = NULL) {
		if(isset($this->_maxVisible) && $this->_maxVisible<$this->count()){
			$this->addFollowPoints();
			if(isset($js)){
				$visibility=new Visibility($js);
				$visibility->attach("#".$this->identifier);
				$visibility->setOnTopVisible("$(this).children('.notVisible').hide();$(this).find('.points').show();");
				$visibility->compile($js,$view);
				$this->_visibility=$visibility;
			}
		}
		return parent::compile ($js,$view);
	}
1005279
protected function init_dependencies() {
		array_walk( $this->handlers,
			function ( $handler, $dependency_type ) {
				if ( $this->hasConfigKey( $dependency_type ) ) {
					$this->dependencies[ $dependency_type ] = $this->init_dependency_type( $dependency_type );
				}
			} );
	}
180093
public function inlineScript($name, $source = null, $dependencies = [], $attributes = [], $replaces = [])
    {
        $this->register('inline', $name, $source, $dependencies, $attributes, $replaces);
    }
1020323
protected function injectCSS() {
            if (!$this->isCLI && !self::$cssInjected) {
                self::$cssInjected = true;
                if (file_exists($this->config->cssPath)) {
                    echo '<style type="text/css">';
                    /** @noinspection PhpIncludeInspection */
                    include $this->config->cssPath;
                    echo '</style>';
                } else {
                    echo 'The AloFramework handlers\' CSS file could not be found: ' . $this->config->cssPath . PHP_EOL;
                }
            }
        }
733769
public function beforeCompile(): void
	{
		$config = $this->validateConfig($this->defaults);

		$definitions = $config['all'] === true
			? $this->getContainerBuilder()->getDefinitions()
			: array_map(
				[$this->getContainerBuilder(), 'getDefinition'],
				array_keys($this->getContainerBuilder()->findByTag(self::TAG_INJECT_VALUE))
			);

		foreach ($definitions as $def) {
			// If class is not defined, then skip it
			if ($def->getType() === null) continue;

			// Inject @value into definitin
			$this->inject($def);
		}
	}
625293
public function loadDefaultDecorators()
    {
        parent::loadDefaultDecorators();
        if (\MUtil_Bootstrap::enabled() === true) {
            $this->addDecorator('Description', array('tag' => 'p', 'class' => 'help-block'))
                 ->addDecorator('HtmlTag', array(
                     'tag' => 'div',
                     'id'  => array('callback' => array(get_class($this), 'resolveElementId')),
                     'class' => 'element-container'
                 ))
                 ->addDecorator('Label')
                 ->addDecorator('BootstrapRow');
        }
        return $this;
    }
421795
public function minifyJS() {
      $js_dir = './js';
      if (is_dir($js_dir)) {
         foreach (glob("$js_dir/*.js") as $js_file) {
            if (!$this->endsWith($js_file, 'min.js')) {
               $this->taskMinify($js_file)
                  ->to(str_replace('.js', '.min.js', $js_file))
                  ->type('js')
                  ->run();
            }
         }
      }
      return $this;
   }
608439
public function compile(JsUtils $js=NULL, &$view=NULL) {
		if($this->autoActive){
			$this->setActive();
		}
		return parent::compile($js, $view);
	}
429301
public function compile(JsUtils $js=NULL, &$view=NULL) {
		if ($this->autoActive) {
			$this->setActive();
		}
		$count=$this->count();
		for($i=1; $i < $count; $i++) {
			$this->content[$i]->wrap($this->getContentDivider($i - 1));
		}
		return parent::compile($js, $view);
	}
627938
public function bootstrap(): void
    {
        foreach ($this->bootstrap as $mixed) {
            $component = null;
            if ($mixed instanceof \Closure) {
                $this->debug('Bootstrap with Closure', __METHOD__);
                if (empty($component = call_user_func($mixed, $this))) {
                    continue;
                }
            } elseif (is_string($mixed)) {
                if ($this->has($mixed)) {
                    $component = $this->get($mixed);
                } elseif ($this->hasModule($mixed)) {
                    $component = $this->getModule($mixed);
                } elseif (strpos($mixed, '\\') === false) {
                    throw new InvalidConfigException("Unknown bootstrapping component ID: $mixed");
                }
            }

            if (!isset($component)) {
                $component = $this->createObject($mixed);
            }

            if ($component instanceof BootstrapInterface) {
                $this->debug('Bootstrap with ' . get_class($component) . '::bootstrap()', __METHOD__);
                $component->bootstrap($this);
            } else {
                $this->debug('Bootstrap with ' . get_class($component), __METHOD__);
            }
        }
    }
498226
private function cmdJss()
    {
        if ($jss = $this->config->get('jss')) {
            echo "\n - Compiled JS+CSS -\n";

            if (!$this->subCmd) {
                foreach ($jss as $k => $v) {
                    echo "\n - $k:\n";
                    $this->jssCompiler($v);
                }
                return;
            }

            if (isset($jss->{$this->subCmd})) {
                echo "\n - ".$this->subCmd."\n";
                
                $this->jssCompiler($jss->{$this->subCmd});
                return;
            } else {
                echo "\n Err: Not found!\n";
                return;
            }
        }
    }
1312144
public function compile(JsUtils $js=NULL, &$view=NULL) {
		$this->content=array();
		if(isset($this->default)){
			$default=new HtmlOption("", $this->default);
			$this->content[]=$default;
		}
		foreach ($this->options as $option){
			$this->content[]=$option;
		}
		return parent::compile($js, $view);
	}
596990
function injectDependencies(serviceLoader) {

    var EventEmitter = require('events').EventEmitter;
    serviceLoader.inject('events', new EventEmitter());

    //inject itself so that services can directly use the service loader
    serviceLoader.inject('serviceLoader', serviceLoader);

    //app will be injected by middleware, so this is a placeholder to force our dependency calculations to be correct
    serviceLoader.inject('app', {}, ['middleware']);
}
385100
private void injectAdditionalStyles() {

        try {
            Collection<String> stylesheets = OpenCms.getWorkplaceAppManager().getAdditionalStyleSheets();
            for (String stylesheet : stylesheets) {
                A_CmsUI.get().getPage().addDependency(new Dependency(Type.STYLESHEET, stylesheet));
            }
        } catch (Exception e) {
            LOG.warn(e.getLocalizedMessage(), e);
        }
    }