HelperTask.php 1.1 KB

12345678910111213141516171819202122232425262728293031323334353637383940414243444546474849505152
  1. <?php
  2. /**
  3. * CakePHP(tm) : Rapid Development Framework (http://cakephp.org)
  4. * Copyright (c) Cake Software Foundation, Inc. (http://cakefoundation.org)
  5. *
  6. * Licensed under The MIT License
  7. * For full copyright and license information, please see the LICENSE.txt
  8. * Redistributions of files must retain the above copyright notice.
  9. *
  10. * @copyright Copyright (c) Cake Software Foundation, Inc. (http://cakefoundation.org)
  11. * @link http://cakephp.org CakePHP(tm) Project
  12. * @since 3.0.0
  13. * @license http://www.opensource.org/licenses/mit-license.php MIT License
  14. */
  15. namespace Cake\Console\Command\Task;
  16. use Cake\Console\Command\Task\SimpleBakeTask;
  17. /**
  18. * Helper code generator.
  19. */
  20. class HelperTask extends SimpleBakeTask {
  21. /**
  22. * Task name used in path generation.
  23. *
  24. * @var string
  25. */
  26. public $pathFragment = 'View/Helper/';
  27. /**
  28. * {@inheritDoc}
  29. */
  30. public function name() {
  31. return 'helper';
  32. }
  33. /**
  34. * {@inheritDoc}
  35. */
  36. public function fileName($name) {
  37. return $name . 'Helper.php';
  38. }
  39. /**
  40. * {@inheritDoc}
  41. */
  42. public function template() {
  43. return 'helper';
  44. }
  45. }