mirror of
https://github.com/kamilwylegala/cakephp2-php8.git
synced 2025-02-07 12:36:25 +00:00
Updating tasks to not rely on the dispatcher being available.
This commit is contained in:
parent
c169de60e2
commit
0a022f1d81
3 changed files with 9 additions and 4 deletions
|
@ -192,7 +192,10 @@ class ExtractTask extends Shell {
|
||||||
return $parser->description(__('CakePHP Language String Extraction:'))
|
return $parser->description(__('CakePHP Language String Extraction:'))
|
||||||
->addOption('app', array('help' => __('directory where your application is located.')))
|
->addOption('app', array('help' => __('directory where your application is located.')))
|
||||||
->addOption('paths', array('help' => __('comma separted list of paths, full paths are needed.')))
|
->addOption('paths', array('help' => __('comma separted list of paths, full paths are needed.')))
|
||||||
->addOption('merge', array('help' => __('[yes|no] Merge all domain strings into the default.po file.')))
|
->addOption('merge', array(
|
||||||
|
'help' => __('[yes|no] Merge all domain strings into the default.po file.'),
|
||||||
|
'choices' => array('yes', 'no')
|
||||||
|
))
|
||||||
->addOption('output', array('help' => __('Full path to output directory.')))
|
->addOption('output', array('help' => __('Full path to output directory.')))
|
||||||
->addOption('files', array('help' => __('comma separated list of files, full paths are needed.')));
|
->addOption('files', array('help' => __('comma separated list of files, full paths are needed.')));
|
||||||
}
|
}
|
||||||
|
|
|
@ -54,8 +54,8 @@ class FixtureTask extends BakeTask {
|
||||||
* Override initialize
|
* Override initialize
|
||||||
*
|
*
|
||||||
*/
|
*/
|
||||||
public function __construct(&$dispatch, $stdout = null, $stderr = null, $stdin = null) {
|
public function __construct($stdout = null, $stderr = null, $stdin = null) {
|
||||||
parent::__construct($dispatch, $stdout, $stderr, $stdin);
|
parent::__construct($stdout, $stderr, $stdin);
|
||||||
$this->path = APP_PATH . 'tests' . DS . 'fixtures' . DS;
|
$this->path = APP_PATH . 'tests' . DS . 'fixtures' . DS;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
|
@ -17,6 +17,8 @@
|
||||||
* @since CakePHP(tm) v 1.3
|
* @since CakePHP(tm) v 1.3
|
||||||
* @license MIT License (http://www.opensource.org/licenses/mit-license.php)
|
* @license MIT License (http://www.opensource.org/licenses/mit-license.php)
|
||||||
*/
|
*/
|
||||||
|
App::import('Core', 'Folder');
|
||||||
|
|
||||||
class TemplateTask extends Shell {
|
class TemplateTask extends Shell {
|
||||||
|
|
||||||
/**
|
/**
|
||||||
|
@ -179,7 +181,7 @@ class TemplateTask extends Shell {
|
||||||
}
|
}
|
||||||
$index = $this->in(__('Which bake theme would you like to use?'), range(1, $i - 1), 1);
|
$index = $this->in(__('Which bake theme would you like to use?'), range(1, $i - 1), 1);
|
||||||
$themeNames = array_keys($this->templatePaths);
|
$themeNames = array_keys($this->templatePaths);
|
||||||
$this->Dispatch->params['theme'] = $themeNames[$index - 1];
|
$this->params['theme'] = $themeNames[$index - 1];
|
||||||
return $indexedPaths[$index];
|
return $indexedPaths[$index];
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
Loading…
Add table
Reference in a new issue