/** * @param CM_Site_Abstract $site * @param bool|null $debug * @param CM_Model_Language $language */ public function __construct(CM_Site_Abstract $site, $debug = null, CM_Model_Language $language) { parent::__construct($site, $debug); $translations = array(); foreach ($language->getTranslations(true) as $translation) { $translations[$translation['key']] = $language->getTranslation($translation['key']); } $this->_js->append('cm.language.setAll(' . CM_Params::encode($translations, true) . ');'); }
/** * @param CM_Site_Abstract $site * @param bool|null $debug */ public function __construct(CM_Site_Abstract $site, $debug = null) { parent::__construct($site, $debug); foreach (self::getIncludedPaths($site) as $path) { $this->_js->append((new CM_File($path))->read()); } $internal = new CM_Asset_Javascript_Internal($site, $debug); $this->_js->append($internal->get()); }
/** * @param CM_Site_Abstract $site * @param bool|null $debug */ public function __construct(CM_Site_Abstract $site, $debug = null) { parent::__construct($site, $debug); $this->_js->append('var cm = new ' . $this->_getAppClassName($site) . '();'); $this->_js->append((new CM_File(DIR_ROOT . 'resources/config/js/internal.js'))->read()); }
/** * @param CM_Site_Abstract $site * @param bool|null $debug */ public function __construct(CM_Site_Abstract $site, $debug = null) { parent::__construct($site, $debug); $this->_appendConfig(); $this->_appendDirectoryBrowserify('client-vendor/serviceworker/', false); }
/** * @param CM_Site_Abstract $site * @param bool|null $debug * @param string|null $type */ public function __construct(CM_Site_Abstract $site, $debug = null, $type = null) { parent::__construct($site, $debug); $type = $type ? (string) $type : null; $this->_process($type); }