当前位置: 首页>>代码示例>>PHP>>正文


PHP static::addMacro方法代码示例

本文整理汇总了PHP中static::addMacro方法的典型用法代码示例。如果您正苦于以下问题:PHP static::addMacro方法的具体用法?PHP static::addMacro怎么用?PHP static::addMacro使用的例子?那么恭喜您, 这里精选的方法代码示例或许可以为您提供帮助。您也可以进一步了解该方法所在static的用法示例。


在下文中一共展示了static::addMacro方法的15个代码示例,这些例子默认根据受欢迎程度排序。您可以为喜欢或者感觉有用的代码点赞,您的评价将有助于系统推荐出更棒的PHP代码示例。

示例1: install

 public static function install(Latte\Compiler $compiler)
 {
     $me = new static($compiler);
     $me->addMacro('gpspicker', '$_gpspicker = $_form[%node.word]; $_gpspickerControl = $_gpspicker->getControl(TRUE); echo $_gpspickerControl->addAttributes(%node.array)->startTag()', 'echo $_gpspickerControl->endTag(); unset($_gpspicker, $_gpspickerControl)');
     $me->addMacro('gpspicker:input', array($me, 'macroInput'));
     $me->addMacro('gpspicker:label', array($me, 'macroLabel'), '?></label><?php');
 }
开发者ID:impala23,项目名称:nette-forms-gpspicker,代码行数:7,代码来源:GpsPickerMacros.php

示例2: install

 /**
  * Register template macro into the latte compiler
  *
  * @param Compiler $compiler
  * @return TemplateMacroSet Provides fluent interface
  */
 public static function install(Compiler $compiler)
 {
     $me = new static($compiler);
     $me->addMacro('template', array($me, 'macroTemplate'));
     $me->addMacro('_', array($me, 'macroTranslate'), array($me, 'macroTranslate'));
     return $me;
 }
开发者ID:nedryse,项目名称:latte-template-macroset,代码行数:13,代码来源:TemplateMacroSet.php

示例3: install

 public static function install(Compiler $compiler)
 {
     $me = new static($compiler);
     IfAllowedHrefMacro::install($compiler);
     $me->addMacro('ifAllowedLink', array(get_called_class(), 'macroIfAllowedLink'), array(get_called_class(), 'macroIfAllowedLinkEnd'));
     $me->addMacro('ifAllowed', array(get_called_class(), 'macroIfAllowed'), array(get_called_class(), 'macroIfAllowedEnd'));
 }
开发者ID:davefu,项目名称:PermissionChecker,代码行数:7,代码来源:PermissionMacros.php

示例4: install

 public static function install(Compiler $compiler)
 {
     $me = new static($compiler);
     $me->addMacro('input', [$me, 'macroInput']);
     $me->addMacro('label', [$me, 'macroLabel'], [$me, 'macroLabelEnd']);
     return $me;
 }
开发者ID:nextras,项目名称:forms,代码行数:7,代码来源:BaseInputMacros.php

示例5: install

 /**
  * @param \Latte\Compiler $compiler
  * @return UIMacros
  */
 public static function install(\Latte\Compiler $compiler)
 {
     $set = new static($compiler);
     $set->addMacro('css', [$set, 'macroCss']);
     $set->addMacro('js', [$set, 'macroJs']);
     return $set;
 }
开发者ID:lohini,项目名称:webloader,代码行数:11,代码来源:UIMacros.php

示例6: install

 public static function install(Compiler $compiler)
 {
     $me = new static($compiler);
     $me->addMacro('snippetId', 'echo %escape($_control->getSnippetId(%node.word))');
     $me->addMacro('param', 'echo %escape($_control->getParameterId(%node.word))');
     $me->addMacro('dynamic', null, null, 'echo Nette\\Utils\\Html::el()->setClass("nittro-snippet-container")->data("dynamic-mask", $_control->getSnippetId(%node.word))->attributes()');
 }
开发者ID:nittro,项目名称:nette-bridges,代码行数:7,代码来源:NittroMacros.php

示例7: install

 public static function install(Compiler $compiler)
 {
     $me = new static($compiler);
     $me->addMacro('ifEnabled', array($me, 'macroIfEnabled'), array($me, 'macroEndIfEnabled'));
     $me->addMacro('ifNotEnabled', array($me, 'macroIfNotEnabled'), array($me, 'macroEndIfEnabled'));
     return $me;
 }
开发者ID:bazo,项目名称:nette-features-extension,代码行数:7,代码来源:FeaturesMacros.php

示例8: install

 public static function install(\Latte\Compiler $compiler)
 {
     $set = new static($compiler);
     $set->addMacro('row', [$set, 'macroRow'], [$set, 'macroRowEnd']);
     $set->addMacro('col', [$set, 'macroCol'], [$set, 'macroCoLEnd']);
     $set->addMacro('rowCol', [$set, 'macroRowCol'], [$set, 'macroRowCoLEnd']);
 }
开发者ID:blitzik,项目名称:CMS,代码行数:7,代码来源:GridMacros.php

示例9: install

 public static function install(Latte\Parser $parser)
 {
     $me = new static($parser);
     $me->addMacro('form', '$form = $control[%node.word]; echo $form->getElementPrototype()->addAttributes(%node.array)->startTag()', 'echo $form->getElementPrototype()->endTag()');
     $me->addMacro('label', array($me, 'macroLabel'), '?></label><?php');
     $me->addMacro('input', 'echo $form[%node.word]->getControl()->addAttributes(%node.array)');
 }
开发者ID:hleumas,项目名称:databaza,代码行数:7,代码来源:FormMacros.php

示例10: install

 public static function install(Latte\Compiler $compiler)
 {
     $me = new static($compiler);
     $me->addMacro('input', array($me, 'macroInput'));
     $me->addMacro('label', array($me, 'macroLabel'), array($me, 'macroLabelEnd'));
     return $me;
 }
开发者ID:patrickkusebauch,项目名称:27skauti,代码行数:7,代码来源:BaseInputMacros.php

示例11: install

 public static function install(Latte\Compiler $parser)
 {
     $me = new static($parser);
     $me->addMacro('inputlist', array($me, 'macroStartList'), array($me, 'macroEndList'));
     $me->addMacro('input', array($me, 'macroInput'));
     $me->addMacro('label', array($me, 'macroLabel'), '?></label><?php');
 }
开发者ID:vojtech-dobes,项目名称:nette-forms-inputlist,代码行数:7,代码来源:InputListMacros.php

示例12: install

 /**
  * @param \Latte\Compiler $compiler
  */
 public static function install(\Latte\Compiler $compiler)
 {
     $me = new static($compiler);
     $me->addMacro('linkThumbnail', 'echo $_presenter->getContext()->getByType("Arachne\\Resources\\Thumbnailer")->getLinkThumbnail(%node.array)');
     $me->addMacro('thumbnail', 'echo $_presenter->getContext()->getByType("Arachne\\Resources\\Thumbnailer")->getThumbnail(%node.array)');
     $me->addMacro('thumbnailUrl', 'echo $_presenter->getContext()->getByType("Arachne\\Resources\\Thumbnailer")->getThumbnailUrl(%node.array)');
 }
开发者ID:arachne,项目名称:resources,代码行数:10,代码来源:ThumbnailerMacros.php

示例13: install

 /**
  * @param \Nette\Latte\Compiler $compiler
  * @return \Nette\Latte\Macros\MacroSet|void
  */
 public static function install(Latte\Compiler $compiler)
 {
     $me = new static($compiler);
     $me->addMacro('scripts', array($me, 'macroScripts'));
     $me->addMacro('styles', array($me, 'macroStyles'));
     $me->addMacro('script', array($me, 'macroScript'));
     $me->addMacro('style', array($me, 'macroStyle'));
 }
开发者ID:web-resources,项目名称:nette-manager,代码行数:12,代码来源:Macros.php

示例14: install

 public static function install(Latte\Compiler $compiler)
 {
     $me = new static($compiler);
     $me->addMacro('loop', array($me, 'macroLoop'), array($me, 'macroLoopEnd'));
     $me->addMacro('each', '', array($me, 'macroEachEnd'));
     $me->addMacro('repeat', array($me, 'macroRepeat'), array($me, 'macroRepeatEnd'));
     $me->addMacro('set', array($me, 'macroSet'));
 }
开发者ID:manGoweb,项目名称:MangoPressTemplating,代码行数:8,代码来源:MangoPressTemplatingMacroSet.php

示例15: install

 public static function install(Compiler $compiler)
 {
     $me = new static($compiler);
     $me->addMacro('head', array($me, 'headBegin'), array($me, 'headEnd'));
     $me->addMacro('body', array($me, 'bodyBegin'), array($me, 'bodyEnd'));
     $me->addMacro('content', array($me, 'contentBegin'));
     $me->addMacro('extensions', array($me, 'extensionsBegin'));
 }
开发者ID:svobodni,项目名称:web,代码行数:8,代码来源:HeadMacro.php


注:本文中的static::addMacro方法示例由纯净天空整理自Github/MSDocs等开源代码及文档管理平台,相关代码片段筛选自各路编程大神贡献的开源项目,源码版权归原作者所有,传播和使用请参考对应项目的License;未经允许,请勿转载。