<commit_before><?php

namespace Bolt\Extension\Raistlfiren\FAIconFieldType;

use Bolt\Application;
use Bolt\BaseExtension;

include_once 'FAIconPickerField.php';

class Extension extends BaseExtension
{
    /**
     * @param Application $app
     */
    public function __construct(Application $app)
    {
        parent::__construct($app);

        //$this->config = $this->app['config'];
        $this->app['config']->getFields()->addField(new FAIconPickerField());

        if ($this->app['config']->getWhichEnd() == 'backend') {
            $this->app['htmlsnippets'] = true;
            $this->app['twig.loader.filesystem']->prependPath(__DIR__."/twig");
        }
    }

    public function initialize() {
        $this->addCSS('assets/css/fontawesome-iconpicker.min.css');
        $this->addJavascript('assets/js/fontawesome-iconpicker.min.js', true);
    }

    public function getName()
    {
        return "faiconpicker";
    }

}





<commit_msg>Only load resources on backend.<commit_after><?php

namespace Bolt\Extension\Raistlfiren\FAIconFieldType;

use Bolt\Application;
use Bolt\BaseExtension;

include_once 'FAIconPickerField.php';

class Extension extends BaseExtension
{
    /**
     * @param Application $app
     */
    public function __construct(Application $app)
    {
        parent::__construct($app);

        //$this->config = $this->app['config'];
        $this->app['config']->getFields()->addField(new FAIconPickerField());

        if ($this->app['config']->getWhichEnd() == 'backend') {
            $this->app['htmlsnippets'] = true;
            $this->app['twig.loader.filesystem']->prependPath(__DIR__."/twig");
        }
    }

    public function initialize() {
        if ($this->app['config']->getWhichEnd() == 'backend') {
            $this->addCSS('assets/css/fontawesome-iconpicker.min.css');
            $this->addJavascript('assets/js/fontawesome-iconpicker.min.js', true);
        }
    }

    public function getName()
    {
        return "faiconpicker";
    }

}






{'fraction_non_alphanumeric': 0.16253716551040634, 'fraction_numerical': 0.0, 'mean_word_length': 2.867816091954023, 'pattern_counts': {'":': 0, '<': 5, '<?xml version=': 0, '>': 29, 'https://': 0, 'lorem ipsum': 0, 'www.': 0, 'xml': 0}, 'pii_count': 0, 'substrings_counts': 0, 'word_list_counts': {'cursed_substrings.json': 0, 'profanity_word_list.json': 0, 'sexual_word_list.json': 0, 'zh_pornsignals.json': 0}}
{'dir': 'git-commits-cleaned', 'id': '6132637', 'n_tokens_mistral': 634, 'n_tokens_neox': 613, 'n_words': 91}