change developmentMode by debugMode in assetManager

This commit is contained in:
Manuel Raynaud
2013-11-12 12:41:01 +01:00
parent e0ede11fc5
commit cbe5ba27cf
2 changed files with 5 additions and 5 deletions

View File

@@ -10,7 +10,7 @@
<!-- The assets manager --> <!-- The assets manager -->
<service id="assetic.asset.manager" class="Thelia\Core\Template\Assets\AsseticAssetManager" > <service id="assetic.asset.manager" class="Thelia\Core\Template\Assets\AsseticAssetManager" >
<argument>%kernel.environment%</argument> <argument>%kernel.debug%</argument>
</service> </service>
<!-- Smarty parser plugins --> <!-- Smarty parser plugins -->

View File

@@ -40,13 +40,13 @@ use Symfony\Component\Filesystem\Exception\IOException;
*/ */
class AsseticAssetManager implements AssetManagerInterface class AsseticAssetManager implements AssetManagerInterface
{ {
protected $developmentMode; protected $debugMode;
protected $source_file_extensions = array('less', 'js', 'coffee', 'html', 'tpl', 'htm', 'xml'); protected $source_file_extensions = array('less', 'js', 'coffee', 'html', 'tpl', 'htm', 'xml');
public function __construct($developmentMode) public function __construct($debugMode)
{ {
$this->developmentMode = $developmentMode; $this->debugMode = $debugMode;
} }
/** /**
@@ -336,7 +336,7 @@ class AsseticAssetManager implements AssetManagerInterface
Tlog::getInstance()->addDebug("Asset destination name: ", $asset_destination_path); Tlog::getInstance()->addDebug("Asset destination name: ", $asset_destination_path);
// We generate an asset only if it does not exists, or if the asset processing is forced in development mode // We generate an asset only if it does not exists, or if the asset processing is forced in development mode
if (! file_exists($asset_destination_path) || ($this->developmentMode && ConfigQuery::read('process_assets', true)) ) { if (! file_exists($asset_destination_path) || ($this->debugMode && ConfigQuery::read('process_assets', true)) ) {
$writer = new AssetWriter($output_directory); $writer = new AssetWriter($output_directory);