Include JS, CSS, and modules used by all methods.

Always called by dispatcher before controller's requested method.

@since 2.0.0
@access public
975731
public function Initialize() {
      $this->Head = new HeadModule($this);
      $this->AddJsFile('jquery.js');
      $this->AddJsFile('jquery.livequery.js');
      $this->AddJsFile('jquery.form.js');
      $this->AddJsFile('jquery.popup.js');
      $this->AddJsFile('jquery.gardenhandleajaxform.js');
      $this->AddJsFile('global.js');
      
      if (in_array($this->ControllerName, array('profilecontroller', 'activitycontroller'))) {
         $this->AddCssFile('style.css');
      } else {
         if (!C('Garden.Cdns.Disable', FALSE))
            $this->AddCssFile('http://fonts.googleapis.com/css?family=Rokkitt');
         $this->AddCssFile('admin.css');
      }
      
      $this->MasterView = 'admin';
      parent::Initialize();
   }
507754
def included(base)
      base.extend ClassMethods
      base.extend Lazydoc::Attributes
      base.extend ModuleMethods unless base.kind_of?(Class)
      
      ClassMethods.initialize(base)
      super
    end
113813
private function beforeForm() {
    // Add Bootstrap CSS if is enabled
    $form_class = "";
    if ( $this -> isUsingBootstrap() ) {
      echo $this -> constants -> getBootstrapCSS();
      if( $this -> bootstrap_form_orientation == "horizontal" ){
        $form_class = "form-horizontal";
      }else if( $this -> bootstrap_form_orientation = "inline" ){
        $form_class = "form-inline";
      }
    }

    // Render form header
    echo "<form method='" . $this -> form_method . "' action='" . $this -> form_action . "' class='" . $form_class . "'>";
  }
550133
public function init() {
		
		$this->addCssClass($this->htmlOptions, 'panel');
		
		if($this->isValidContext())
			self::addCssClass($this->htmlOptions, 'panel-'.$this->getContextClass());

		if ($this->padContent)
			self::addCssClass($this->contentHtmlOptions, 'panel-body');

		if (!isset($this->contentHtmlOptions['id'])) {
			$this->contentHtmlOptions['id'] = $this->getId();
		}

		if (isset($this->headerHtmlOptions['class'])) {
			$this->headerHtmlOptions['class'] = 'panel-heading ' . $this->headerHtmlOptions['class'];
		} else {
			$this->headerHtmlOptions['class'] = 'panel-heading';
		}

		echo CHtml::openTag('div', $this->htmlOptions);

		$this->renderHeader();
		$this->renderContentBegin();
	}
657289
private function load_functions() {
		if ( $this->is_theme ) {
			return;
		}
		$functions = $this->define->plugin_dir . DS . 'functions.php';
		if ( is_readable( $functions ) ) {
			/** @noinspection PhpIncludeInspection */
			require_once $functions;
		}
	}
1229716
public function includeModules()
    {
        if (!is_array($this->needModules) || empty($this->needModules))
        {
            return false;
        }

        foreach ($this->needModules as $module)
        {
            if (!Main\Loader::includeModule($module))
            {
                throw new Main\LoaderException('Failed include module "'.$module.'"');
            }
        }
    }
355883
static function Init()
	{
		require_once 'verysimple/Phreeze/Controller.php';
		require_once 'verysimple/HTTP/RequestUtil.php';

		if (!self::$IS_INITIALIZED)
		{
			RequestUtil::NormalizeUrlRewrite();

			Controller::$SmartyViewPrefix = '';
			Controller::$DefaultRedirectMode = 'header';

			self::$IS_INITIALIZED = true;
		}

	}
730497
private function render()
    {
        echo '
            <style>
            .debugger small {
                border: 1px solid rgba(0,0,0,0.2); 
                opacity: 0.5; 
                padding: 2px 5px; 
                margin-left: 5px; 
                border-radius: 2px;
            }
            </style>';

        echo '<pre class="debugger"><strong>@debug</strong><br>';

        foreach ($this->data as $index => $controller) {
            // Set the class params for each Controller
            $this->controller = $controller;

            // Echo the Controller class name
            echo $controller->class;

            // Echo extends tree if the Controller implements tree
            if ($controller->tree) {
                echo '<small>extends tree</small>';
            }

            echo '<ul>';

            // Render data
            if ($controller->data) {
                $this->renderData();
            }

            // Render methods
            if ($controller->methods) {
                $this->renderMethods();
            }

            echo '</ul>';
        }

        echo '</pre>';
    }
413935
function loadIncludes() {
  for ( var module in reqModules ) {
    if ( module && module != 'pong-tableXX' ) { // just to exclude modules, for debugging it's better to include them hardcoded in index.html

      // extra CSS files
      if ( moduleMap[ module ] ) {
        if ( moduleMap[ module ].css ) {
          for ( var i = 0; i < moduleMap[ module ].css.length; i++ ) {
            log( 'loadModules', module+' add extra CSS: '+modulesPath+module+'/'+moduleMap[ module ].css[i]  );
            jQuery('head').append('<link rel="stylesheet" rel="nofollow" href="'+modulesPath+module+'/'+moduleMap[ module ].css[i] +'" type="text/css" />');
          }
        }
      
        // include files
        if ( moduleMap[ module ].include ) {
          for ( var i = 0; i < moduleMap[ module ].include.length; i++ ) {
            //for ( var includeJS in moduleMap[ module ].include ) {
            var includeJS = moduleMap[ module ].include[i];
            log( 'loadModules', module+' load include: '+modulesPath+module+'/'+includeJS );
            ajaxOngoing++;
              $.getScript( modulesPath+module+'/'+includeJS )
              .done( function( script, textStatus, jqxhr ) { 
                log( 'loadModules', this.url+' '+textStatus ); ajaxOngoing--; } )
              .fail( function( jqxhr, settings, exception ) { 
                log( 'loadModules', this.url+' '+exception ); ajaxOngoing--; }  );
          }
        }
      }
    }
  }
  ajaxOngoing--;
}
1043795
function(module) {
        for (var i = 0; i < module.include.length; i++) {
          var curInclude = module.include[i];
          if (curInclude.substr(0, 2) == '^!') {
            module.include[i] = curInclude.substr(2);
            attachBuildIds.push(curInclude.substr(2));
          }
        }
      }
443376
public function load() {
		if ( ! is_admin() ) {
			_doing_it_wrong(
				__METHOD__,
				'It should only be called on admin pages.',
				esc_html( Icon_Picker::VERSION )
			);

			return;
		}

		if ( ! did_action( 'icon_picker_loader_init' ) ) {
			_doing_it_wrong(
				__METHOD__,
				sprintf(
					'It should not be called until the %s hook.',
					'<code>icon_picker_loader_init</code>'
				),
				esc_html( Icon_Picker::VERSION )
			);

			return;
		}

		add_action( 'admin_enqueue_scripts', array( $this, '_enqueue_assets' ) );
		add_action( 'print_media_templates', array( $this, '_media_templates' ) );
	}
920493
public function init() {

		// Gets options to load
    	$options = & Options_Framework::_optionsframework_options();

		// Checks if options are available
    	if ( $options ) {

			// Add the options page and menu item.
			add_action( 'admin_menu', array( $this, 'add_custom_options_page' ) );

			// Add the required scripts and styles
			add_action( 'admin_enqueue_scripts', array( $this, 'enqueue_admin_styles' ) );
			add_action( 'admin_enqueue_scripts', array( $this, 'enqueue_admin_scripts' ) );

			// Settings need to be registered after admin_init
			add_action( 'admin_init', array( $this, 'settings_init' ) );

			// Adds options menu to the admin bar
			add_action( 'wp_before_admin_bar_render', array( $this, 'optionsframework_admin_bar' ) );

		} else {
			// Display a notice if options aren't present in the theme
			add_action( 'admin_notices', array( $this, 'options_notice' ) );
			add_action( 'admin_init', array( $this, 'options_notice_ignore' ) );
		}

    }
1363064
protected function includeDependencies()
    {
        $view = $this->getView();
        $view->headScript()->appendFile($view->basePath() . '/js/bootstrap-colorpicker.js');
        $view->headLink()->prependStylesheet($view->basePath() . '/css/colorpicker.css');
    }
255675
function load() {
			$all_modules = $this->get_all_modules();

			if ( ! is_numeric( $this->_module_id ) ) {
				unset( $all_modules[ self::OPTION_NAME_THEMES ] );
			}

			foreach ( $all_modules as $modules ) {
				/**
				 * @since 1.2.2
				 *
				 * @var $modules FS_Plugin[]
				 */
				foreach ( $modules as $module ) {
					$found_module = false;

					/**
					 * If module ID is not numeric, it must be a plugin's slug.
					 *
					 * @author Leo Fajardo (@leorw)
					 * @since  1.2.2
					 */
					if ( ! is_numeric( $this->_module_id ) ) {
						if ( $this->_module_id === $module->slug ) {
							$this->_module_id = $module->id;
							$found_module     = true;
						}
					} else if ( $this->_module_id == $module->id ) {
						$found_module = true;
					}

					if ( $found_module ) {
						$this->_module = $module;
						break;
					}
				}
			}
		}
555564
def include_jquery(options = { })
      options = { env: Rails.env.to_sym }.merge(options)
      JqueryCdn.local_url = proc { javascript_path("jquery.js") }
      JqueryCdn.include_jquery(options).html_safe
    end
1306439
public function initCompiler()
    {
        /** @var ModuleContainerInterface $this */
        if ($onRender = $this->getOption('on_render')) {
            if (isset($this->optionEvents['on_render'])) {
                $this->detach(RendererEvent::RENDER, $this->optionEvents['on_render']);
            }
            $this->attach(RendererEvent::RENDER, $onRender);
        }

        if ($onHtml = $this->getOption('on_html')) {
            if (isset($this->optionEvents['on_html'])) {
                $this->detach(RendererEvent::HTML, $this->optionEvents['on_html']);
            }
            $this->attach(RendererEvent::HTML, $onHtml);
        }

        $this->optionEvents = [
            'on_render' => $onRender,
            'on_html'   => $onHtml,
        ];

        $this->handleOptionAliases();

        $compilerClassName = $this->getOption('compiler_class_name');

        if (!is_a($compilerClassName, CompilerInterface::class, true)) {
            throw new RendererException(
                "Passed compiler class $compilerClassName is ".
                'not a valid '.CompilerInterface::class
            );
        }

        $this->compiler = new $compilerClassName($this->getOptions());
    }
253935
public function loadRequirements()
    {
        // Load Required CSS:
        
        foreach ($this->getRequiredCSS() as $css) {
            Requirements::css($css);
        }
        
        // Load Required JavaScript:
        
        foreach ($this->getRequiredJS() as $js) {
            Requirements::javascript($js);
        }
    }