Skip to content
This repository has been archived by the owner on Apr 6, 2020. It is now read-only.

Commit

Permalink
Merge tag '4.4' into develop
Browse files Browse the repository at this point in the history
Version 4.4
  • Loading branch information
tristanlins committed Jun 24, 2014
2 parents 074e40d + e91ad68 commit 0708599
Show file tree
Hide file tree
Showing 4 changed files with 13 additions and 1 deletion.
2 changes: 1 addition & 1 deletion contao/dca/tl_page.php
Original file line number Diff line number Diff line change
Expand Up @@ -24,7 +24,7 @@
$GLOBALS['TL_DCA']['tl_page']['palettes']['__selector__'][] = 'theme_plus_include_javascripts_noinherit';

$GLOBALS['TL_DCA']['tl_page']['palettes'][$strType] = preg_replace(
'#({layout_legend:hide}.*);#U',
'#({layout_legend(:hide)?}.*);#U',
'$1,theme_plus_include_stylesheets,theme_plus_include_stylesheets_noinherit,theme_plus_include_javascripts,theme_plus_include_javascripts_noinherit;',
$GLOBALS['TL_DCA']['tl_page']['palettes'][$strType]
);
Expand Down
8 changes: 8 additions & 0 deletions src/Bit3/Contao/ThemePlus/Filter/ContaoInsertTagFilter.php
Original file line number Diff line number Diff line change
Expand Up @@ -20,6 +20,14 @@ class ContaoInsertTagFilter
extends \Controller
implements \Assetic\Filter\FilterInterface
{
/**
* As the \Controller class extends the \System class which has a protected __construct
* we have to override the constructor to make it available
*/
public function __construct() {
return parent::__construct();
}

/**
* Filters an asset after it has been loaded.
*
Expand Down
3 changes: 3 additions & 0 deletions src/Bit3/Contao/ThemePlus/Filter/ThemePlusFilterFactory.php
Original file line number Diff line number Diff line change
Expand Up @@ -29,6 +29,9 @@ public function createFilter(array $filterConfig)
case 'contaoReplaceVariable':
$filter = new ContaoReplaceVariableFilter();
break;
case 'contaoInsertTag':
$filter = new ContaoInsertTagFilter();
break;
}

if($filter === null)
Expand Down
1 change: 1 addition & 0 deletions src/Bit3/Contao/ThemePlus/ThemePlus.php
Original file line number Diff line number Diff line change
Expand Up @@ -57,6 +57,7 @@ public static function getInstance()
$_SESSION['THEME_PLUS_ASSETS'] = array();
}

// Add new assetic filter factory
AsseticFactory::registerFilterFactory(new Filter\ThemePlusFilterFactory());
}
return static::$instance;
Expand Down

0 comments on commit 0708599

Please sign in to comment.