PHP code example of flextype-components / assets

1. Go to this page and download the library: Download flextype-components/assets library. Choose the download type require.

2. Extract the ZIP file and open the index.php.

3. Add this code to the index.php.
    
        
<?php
require_once('vendor/autoload.php');

/* Start to develop here. Best regards https://php-download.com/ */

    

flextype-components / assets example snippets


use Flextype\Component\Assets\Assets;

Assets::add('js', 'jquery.js', 'site', 1);
Assets::add('js', 'site.js', 'site', 2);
Assets::add('css', 'site.css', 'site', 1);
Assets::add('css', 'theme.css', 'site', 2);

$css = Assets::get('css', 'site');
$js  = Assets::get('js', 'site');