Aimeos\ShopBundle\Composer\ScriptHandler::addAsseticBundle PHP Method

addAsseticBundle() protected static method

Adds the AimeosShopBundle to the assetic section of the config file
protected static addAsseticBundle ( &$content ) : boolean
return boolean True if modified, false if not
    protected static function addAsseticBundle(&$content)
    {
        if (preg_match("/    bundles:[ ]*\\[.*'AimeosShopBundle'.*\\]/", $content) !== 1) {
            $search = array("/    bundles:[ ]*\\[([^\\]]+)\\]/", "/    bundles:[ ]*\\[([ ]*)\\]/");
            $replace = array("    bundles: [\$1,'AimeosShopBundle']", "    bundles: ['AimeosShopBundle']");
            if (($content = preg_replace($search, $replace, $content)) !== null) {
                return true;
            }
        }
        return false;
    }