mirror of
				https://github.com/hauke68/Magallanes.git
				synced 2025-11-04 00:50:18 +01:00 
			
		
		
		
	Add optional parameters for symfony2/cache-clear
Add optional parameters for symfony2/cache-clear task like --no-warmup.
This commit is contained in:
		
							parent
							
								
									5eb771bf30
								
							
						
					
					
						commit
						4d1048cca6
					
				@ -14,8 +14,13 @@ use Mage\Task\BuiltIn\Symfony2\SymfonyAbstractTask;
 | 
			
		||||
 | 
			
		||||
/**
 | 
			
		||||
 * Task for Clearing the Cache
 | 
			
		||||
 * 
 | 
			
		||||
 * Example of usage:
 | 
			
		||||
 *    symfony2/cache-clear: { env: dev }
 | 
			
		||||
 *    symfony2/cache-clear: { env: dev, optional: --no-warmup }
 | 
			
		||||
 *
 | 
			
		||||
 * @author Andrés Montañez <andres@andresmontanez.com>
 | 
			
		||||
 * @author Samuel Chiriluta <samuel4x4@gmail.com>
 | 
			
		||||
 */
 | 
			
		||||
class CacheClearTask extends SymfonyAbstractTask
 | 
			
		||||
{
 | 
			
		||||
@ -36,8 +41,10 @@ class CacheClearTask extends SymfonyAbstractTask
 | 
			
		||||
    {
 | 
			
		||||
        // Options
 | 
			
		||||
        $env = $this->getParameter('env', 'dev');
 | 
			
		||||
        $optional = $this->getParameter('optional', '');
 | 
			
		||||
 | 
			
		||||
        $command = $this->getAppPath() . ' cache:clear --env=' . $env . ' ' . $optional;
 | 
			
		||||
 | 
			
		||||
        $command = $this->getAppPath() . ' cache:clear --env=' . $env;
 | 
			
		||||
        $result = $this->runCommand($command);
 | 
			
		||||
 | 
			
		||||
        return $result;
 | 
			
		||||
 | 
			
		||||
		Loading…
	
		Reference in New Issue
	
	Block a user