Example #1
0
 public function __construct()
 {
     parent::__construct();
     $base = Filesystem::clean(realpath(__DIR__ . '/../../../assets/'));
     $assetManager = Template::getAssetManager();
     $assetManager->setBasePath($base);
     $assetManager->addAssetBundle('fonts', Filesystem::concat($base, 'superficiem/fonts'));
     $assetManager->addAsset('superficiem_style', Filesystem::concat($base, 'superficiem/css/superficiem.css'), ['fonts']);
     $assetManager->addAsset('jquery', Filesystem::concat($base, 'superficiem/js/jquery.min.js'));
     $assetManager->addAsset('tether', Filesystem::concat($base, 'superficiem/js/tether.min.js'));
     $assetManager->addAssetBundle('tmce', Filesystem::concat($base, 'superficiem/tmce'))->addRenderFile('tinymce.min.js');
     $assetManager->addAsset('bootstrap', Filesystem::concat($base, 'superficiem/js/bootstrap.min.js'), ['jquery', 'tether']);
     $assetManager->addAsset('superficiem_script', Filesystem::concat($base, 'superficiem/js/superficiem.js'), ['bootstrap', 'tmce']);
 }
Example #2
0
<?php

/**
 * This file is part of the SoureCode/Superficiem package.
 *
 * (c) chapterjason <*****@*****.**>
 *
 * For the full copyright and license information, please view the LICENSE
 * file that was distributed with this source code.
 */
/**
 * @var Template $this
 */
use SoureCode\Component\Template\Template;
$this->block('footer', function () {
    if (($asset = Template::getAssetManager()->getAsset('superficiem_script')) !== FALSE) {
        $asset->render();
    }
});
?>
</body>
</html>