示例#1
0
 /**
  * {@inheritdoc}
  */
 protected function addDefaultHelpers()
 {
     parent::addDefaultHelpers();
     // Date helpers
     $this->add('formatDate', new Date\FormatDateHelper());
     // Collection helpers
     $this->add('count', new Collection\CountHelper());
     $this->add('first', new Collection\FirstHelper());
     $this->add('last', new Collection\LastHelper());
     // Comparison helpers
     $this->add('ifAny', new Comparison\IfAnyHelper());
     $this->add('ifEqual', new Comparison\IfEqualHelper());
     $this->add('ifEven', new Comparison\IfEvenHelper());
     $this->add('ifOdd', new Comparison\IfOddHelper());
     $this->add('unlessEqual', new Comparison\UnlessEqualHelper());
     // String helpers
     $this->add('lowercase', new String\LowercaseHelper());
     $this->add('uppercase', new String\UppercaseHelper());
     $this->add('repeat', new String\RepeatHelper());
     $this->add('replace', new String\ReplaceHelper());
     $this->add('truncate', new String\TruncateHelper());
     // Layout helpers
     $storage = new Layout\BlockStorage();
     $this->add('block', new Layout\BlockHelper($storage));
     $this->add('extends', new Layout\ExtendsHelper($storage));
     $this->add('override', new Layout\OverrideHelper($storage));
     $this->add('ifOverridden', new Layout\IfOverriddenHelper($storage));
     $this->add('unlessOverridden', new Layout\UnlessOverriddenHelper($storage));
 }
示例#2
0
 /**
  * {@inheritdoc}
  */
 protected function addDefaultHelpers()
 {
     parent::addDefaultHelpers();
     $this->add('count', new CountHelper());
     $this->add('first', new FirstHelper());
     $this->add('last', new LastHelper());
 }
 /**
  * {@inheritdoc}
  */
 protected function addDefaultHelpers()
 {
     parent::addDefaultHelpers();
     $this->add('ifAny', new IfAnyHelper());
     $this->add('ifEqual', new IfEqualHelper());
     $this->add('ifEven', new IfEvenHelper());
     $this->add('ifOdd', new IfOddHelper());
     $this->add('unlessEqual', new UnlessEqualHelper());
 }
 /**
  * {@inheritdoc}
  */
 protected function addDefaultHelpers()
 {
     parent::addDefaultHelpers();
     $this->add('lowercase', new LowercaseHelper());
     $this->add('uppercase', new UppercaseHelper());
     $this->add('repeat', new RepeatHelper());
     $this->add('replace', new ReplaceHelper());
     $this->add('truncate', new TruncateHelper());
 }
 /**
  * {@inheritdoc}
  */
 protected function addDefaultHelpers()
 {
     parent::addDefaultHelpers();
     $storage = new BlockStorage();
     $this->add('block', new BlockHelper($storage));
     $this->add('extends', new ExtendsHelper($storage));
     $this->add('override', new OverrideHelper($storage));
     $this->add('ifOverridden', new IfOverriddenHelper($storage));
     $this->add('unlessOverridden', new UnlessOverriddenHelper($storage));
 }
 /**
  * {@inheritdoc}
  */
 protected function addDefaultHelpers()
 {
     parent::addDefaultHelpers();
     $this->add('ifAny', new IfAnyHelper());
     $this->add('ifEqual', new IfEqualHelper());
     $this->add('ifEven', new IfEvenHelper());
     $this->add('ifOdd', new IfOddHelper());
     $this->add('ifLess', new IfLessHelper());
     $this->add('ifMore', new IfMoreHelper());
     $this->add('ifBetween', new IfBetweenHelper());
     $this->add('ifBetweenClosed', new IfBetweenClosedHelper());
     $this->add('ifBetweenLeftClosed', new IfBetweenLeftClosedHelper());
     $this->add('ifBetweenRightClosed', new IfBetweenRightClosedHelper());
     $this->add('unlessEqual', new UnlessEqualHelper());
 }
示例#7
0
 /**
  * {@inheritdoc}
  */
 protected function addDefaultHelpers()
 {
     parent::addDefaultHelpers();
     $this->add('l10n', new Helper\L10nHelper());
     $this->add('generatePagination', new Helper\GeneratePaginationHelper());
     $this->add('formatDate', new Helper\FormatDateHelper());
     $this->add('formatDateDiff', new Helper\FormatDateDiffHelper());
     $this->add('csrfTokenInput', new Helper\CsrfTokenInputHelper());
     // Use third party helpers
     $this->add('ifEqual', new HandlebarsHelpers\Comparison\IfEqualHelper());
     $this->add('ifAny', new HandlebarsHelpers\Comparison\IfAnyHelper());
     $this->add('ifEven', new HandlebarsHelpers\Comparison\IfEvenHelper());
     $this->add('ifOdd', new HandlebarsHelpers\Comparison\IfOddHelper());
     $this->add('repeat', new HandlebarsHelpers\String\RepeatHelper());
     $this->add('replace', new HandlebarsHelpers\String\ReplaceHelper());
     $this->add('cutString', new HandlebarsHelpers\String\TruncateHelper());
     $blocks = new HandlebarsHelpers\Layout\BlockStorage();
     $this->add('extends', new HandlebarsHelpers\Layout\ExtendsHelper($blocks));
     $this->add('block', new HandlebarsHelpers\Layout\BlockHelper($blocks));
     $this->add('override', new HandlebarsHelpers\Layout\OverrideHelper($blocks));
     $this->add('ifOverridden', new HandlebarsHelpers\Layout\IfOverriddenHelper($blocks));
     $this->add('unlessOverridden', new HandlebarsHelpers\Layout\UnlessOverriddenHelper($blocks));
 }
示例#8
0
 /**
  * {@inheritdoc}
  */
 protected function addDefaultHelpers()
 {
     parent::addDefaultHelpers();
     $this->add('formatDate', new FormatDateHelper());
 }