Loads the dependencies and renders the JavaScript-readable logic to the form HTML

@return  string
433817
public function DisplayLogic()
    {
        if ($criteria = $this->getDisplayLogicCriteria()) {
            Requirements::javascript('unclecheese/display-logic: client/dist/js/bundle.js');
            Requirements::css('unclecheese/display-logic: client/dist/styles/bundle.css');
            return $criteria->toScript();
        }
        
        return false;
    }
1303651
public function getDependencies()
    {
        // Simple cache.
        if (is_array($this->dependencies)) {
            return $this->dependencies;
        }
        $this->dependencies = [];

        $filter = new StatementFilter();
        $parser = new CodeParser();

        $statements = $parser->parseFile($this->directory.'/version.php');

        try {
            $assign = $filter->findFirstPropertyFetchAssignment($statements, 'plugin', 'dependencies');
        } catch (\Exception $e) {
            try {
                $assign = $filter->findFirstPropertyFetchAssignment($statements, 'module', 'dependencies');
            } catch (\Exception $e) {
                return $this->dependencies;
            }
        }

        if (!$assign->expr instanceof Array_) {
            throw new \RuntimeException('The $plugin->dependencies must be assigned to an array in the version.php file.');
        }
        $this->dependencies = $filter->arrayStringKeys($assign->expr);

        return $this->dependencies;
    }
7530
public function load()
    {
        $this->manifest = new ArrayObject(array(
            'name' => $this->getModuleName(),
            'version' => $this->getModuleVersion(),
            'application_config' => array(),
            'autoloader_config' => array(),
            'console' => array(
                'usage' => array(),
            ),
        ));

        $this->loadClassConfig()
             ->loadLayoutConfig()
             ->loadResourceConfig()
             ->loadThemeConfig()
             ->loadServiceConfig()
             ->loadPluginManagerConfigs()
             ->loadLocaleConfig()
             ->loadRouteConfig()
             ->loadDiConfig()
             ->loadConsoleConfig();

//              ->loadDiConfig()
//              ->loadConsoleConfig();

        $this->processIncludes();

        return $this->manifest;
    }
1181396
public static function load()
    {
        if (!extension_loaded('opencensus')) {
            trigger_error('opencensus extension required to load Laravel integrations.', E_USER_WARNING);
            return;
        }

        Eloquent::load();

        // Create a trace span for every template rendered
        // public function get($path, array $data = array())
        opencensus_trace_method(CompilerEngine::class, 'get', function ($scope, $path, $data) {
            return [
                'name' => 'laravel/view',
                'attributes' => [
                    'path' => $path
                ]
            ];
        });
    }
932994
public function getDependencies()
    {
        if (empty($this->dependencies)) {
            foreach ($this->getManifest()->getDependencies() as $id => $version) {
                $this->dependencies[$id] = $version;
                $dependence = $this->getExtensionManager()->getExtensionById($id);
                $this->dependencies = array_merge($this->dependencies, $dependence->getDependencies());
            }
        }
        return $this->dependencies;
    }
915107
public function load()
    {
        // NOTE: ALL THE LOCAL VARIABLES ARE USED INSIDE INCLUDED FILE, DO NOT REMOVE THEM!
        $grav = $this->grav;
        $config = $this->config;
        $name = $this->current();

        /** @var UniformResourceLocator $locator */
        $locator = $grav['locator'];
        $file = $locator('theme://theme.php') ?: $locator("theme://{$name}.php");

        $inflector = $grav['inflector'];

        if ($file) {
            // Local variables available in the file: $grav, $config, $name, $file
            $class = include $file;

            if (!is_object($class)) {
                $themeClassFormat = [
                    'Grav\\Theme\\' . ucfirst($name),
                    'Grav\\Theme\\' . $inflector->camelize($name)
                ];

                foreach ($themeClassFormat as $themeClass) {
                    if (class_exists($themeClass)) {
                        $themeClassName = $themeClass;
                        $class = new $themeClassName($grav, $config, $name);
                        break;
                    }
                }
            }
        } elseif (!$locator('theme://') && !defined('GRAV_CLI')) {
            exit("Theme '$name' does not exist, unable to display page.");
        }

        $this->config->set('theme', $config->get('themes.' . $name));

        if (empty($class)) {
            $class = new Theme($grav, $config, $name);
        }

        return $class;
    }
233257
public function getHtml()
    {
        $url = json_encode((string) $this->resolver->resolve(['/install', 'web_precondition', 'request_urls', '20']));
        $errorMessage = json_encode(t('concrete5 cannot parse the PATH_INFO or ORIG_PATH_INFO information provided by your server.'));
        $myIdentifier = json_encode($this->getUniqueIdentifier());

        return <<<EOT
<script>
$(document).ready(function() {
    $.ajax({
        cache: false,
        dataType: 'json',
        method: 'GET',
        url: {$url}
    })
    .done(function(data) {
        if (data.response === 400) {
            setWebPreconditionResult({$myIdentifier}, true);
        } else {
            setWebPreconditionResult({$myIdentifier}, false, {$errorMessage});
        }
    })
    .fail(function(xhr, textStatus, errorThrown) {
        setWebPreconditionResult({$myIdentifier}, false, {$errorMessage});
    });
});
</script>
EOT
        ;
    }
353470
public function loadPackages()
    {
        $path = base_path('src');
        
        $packages = collect();

        foreach (glob($path."/*") as $directory) {
            $name = basename($directory);

            $file = $directory."/Package.php";
            $class = "{$name}\Package";

            if (File::exists($file)) {
                require_once $file;
                $class = new $class($this, $directory, $name);
                $class->boot();

                $packages[] = $class;
            }
        }


        $packages->map(function ($package) {
            $package->register();
        });
    }
1158175
public function renderJs()
    {
        $jsFileList = $this->getJsFileList();

        if ($jsFileList->count() == 0) {
            return '';
        }

        $generate   = true;
        $bundlePath = $this->getJsBundlePath();

        if (!$this->getForce() && file_exists($bundlePath)) {
            $cacheTime = filemtime($bundlePath);

            if (false !== $cacheTime && $cacheTime >= $jsFileList->getMaxMTime()) {
                $generate = false;
            }
        }

        $bundleUrl = $this->getJsBundleUrl();

        if ($generate) {
            $data   = '';
            $filter = $this->getJsFilter();

            foreach ($jsFileList as $file => $fileInfo) {
                $data .= '/* --------- ' . $file . ' --------- */' . PHP_EOL;
                $contents = @file_get_contents($fileInfo->getPathname());
                if (!$contents) {
                    $data .= '/* FILE READ ERROR! */' . PHP_EOL;
                } else {
                    if (null !== $filter) {
                        $contents = $filter->filterFile($contents, $file, $fileInfo, $bundleUrl, $bundlePath);
                    }

                    $data .= $contents . PHP_EOL;
                }
            }

            if (null !== $filter) {
                $data = $filter->filter($data);
            }

            $cacheTime = $this->writeBundleFile($bundlePath, $data);
        }

        $template = $this->getJsTemplate();

        if (is_callable($template)) {
            return call_user_func($template, $bundleUrl, $cacheTime);
        }

        return sprintf(
            $template,
            $bundleUrl,
            $cacheTime
        );
    }
591324
public function jsRender()
    {
        $ret = '';

        // start with constructor
        $ret .= $this->_library;

        // next perhaps we have arguments
        if ($this->_constructorArgs) {
            $ret .= $this->_renderArgs($this->_constructorArgs);
        }

        // next we do same with the calls
        foreach ($this->_chain as $chain) {
            if (is_array($chain)) {
                $ret .= '.'.$chain[0].$this->_renderArgs($chain[1]);
            } elseif (is_numeric($chain)) {
                $ret .= '['.$chain.']';
            } else {
                $ret .= '.'.$chain;
            }
        }

        return $ret;
    }
1082191
protected function RenderImpl()
    {

        $url = $this->owner->getURLNode() . "::" . $this->id . "&ajax=true";
        if ($this->refresh) {
            $this->setAttribute("onclick", "getUpdate('{$url}');event.returnValue=false; return false;");
        }
        $this->setAttribute('src', $this->owner->getURLNode() . "::" . $this->id . ':' . time() . '&binary=true');
    }
1082241
public static function init()
	{
		$baseDir = KINT_DIR . 'view/compiled/';

		if ( !is_readable( $cssFile = $baseDir . Kint::$theme . '.css' ) ) {
			$cssFile = $baseDir . 'original.css';
		}

		return
			'<script class="-kint-js">' . file_get_contents( $baseDir . 'kint.js' ) . '</script>'
			. '<style class="-kint-css">' . file_get_contents( $cssFile ) . "</style>\n";
	}
208620
public function load()
    {
        if (self::$json === null) {
            self::$json = array();
            if (!empty($this->extSettings['json'])) {
                $file = MaskUtility::getFileAbsFileName($this->extSettings['json']);
                if (file_exists($file)) {
                    self::$json = json_decode(file_get_contents($file), true);
                }
            }
        }
        return self::$json;
    }
556187
public function display()
	{
        App::$Alias->setCustomLibrary('js', $this->baseUrl . '/ckeditor.js');
        App::$Alias->setCustomLibrary('js', $this->baseUrl . '/adapters/jquery.js');
        $jsInitializeCode = "$('.{$this->targetClass}').ckeditor({";
        $jsInitializeCode .= "language: '{$this->language}', customConfig: '{$this->config}.js', ";
        if ($this->jsConfig !== null && Any::isArray($this->jsConfig)) {
            foreach ($this->jsConfig as $obj => $value) {
                $jsInitializeCode .= $obj . ": '" . $value . "', ";
            }
        }
	    $jsInitializeCode .= "});";

        App::$Alias->addPlainCode('js', $jsInitializeCode);
		return null;
	}
606720
public function getDependencyPackages()
    {
        $this->_dependencyPackages = array();
        if (!isset($this->_packageXml->dependencies->required->package)) {
            return $this->_dependencyPackages;
        }
        foreach($this->_packageXml->dependencies->required->package as $_package) {
            $add = array(
                'name'    => (string)$_package->name,
                'channel' => (string)$_package->channel,
                'min'     => (string)$_package->min,
                'max'     => (string)$_package->max,
            );
            if(isset($_package->files)) {
                $add['files'] = array();
                foreach($_package->files as $node) {
                    if(isset($node->file)) {

                        $add['files'][] = array('target' => (string) $node->file['target'], 'path'=> (string) $node->file['path']);
                    }
                }
            }
            $this->_dependencyPackages[] = $add;
        }
        return $this->_dependencyPackages;
    }
284321
public function renderStyles()
    {
        $this->loadPackageCss();

        if (empty($this->styles)) {
            return PHP_EOL;
        }

        $assets = [];

        foreach ($this->sort($this->styles) as $handle => $data) {
            $assets[] = $this->getCss($handle);
        }

        return implode(PHP_EOL, $assets);
    }
905838
protected function getJavaScriptFiles()
    {
        $formObject = $this->assetHandlerFactory->getFormObject();

        $javaScriptFiles = $this->getFieldsValidationJavaScriptAssetHandler()
            ->getJavaScriptValidationFiles();

        $conditionProcessor = $this->getConditionProcessor($formObject);

        $javaScriptFiles = array_merge($javaScriptFiles, $conditionProcessor->getJavaScriptFiles());

        return $javaScriptFiles;
    }