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


PHP FormHelper::addScriptsAndStyles方法代码示例

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


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

示例1: execute

 /**
  * Mandatory execute method...
  *
  * @param block_BlockContext $context
  * @param block_BlockRequest $request
  */
 public function execute($context, $request)
 {
     FormHelper::addScriptsAndStyles($context);
     $form = $this->getParameter('form');
     $this->setTemplateName('markup/' . $form->getMarkup() . '/Form');
     $this->setAttribute('form', $form);
     $contents = array();
     form_FormService::getInstance()->buildContentsFromRequest($form->getDocumentNode()->getChildren(), $contents, $request, $form);
     $this->setAttribute('elements', $contents);
     if ($this->hasParameter('errors')) {
         $this->setAttribute('errors', $this->getParameter('errors'));
     }
     $this->setAttribute('selfUrl', $_SERVER['REQUEST_URI']);
     if ($request->getParameter(form_FormConstants::BACK_URL_PARAMETER)) {
         $backUrl = $request->getParameter(form_FormConstants::BACK_URL_PARAMETER);
     } else {
         if (isset($_SERVER['HTTP_REFERER'])) {
             $backUrl = $_SERVER['HTTP_REFERER'];
         } else {
             $backUrl = website_WebsiteModuleService::getInstance()->getCurrentWebsite()->getUrl();
         }
     }
     $this->setAttribute("receiverLabels", $this->getParameter("receiverLabels"));
     $this->setAttribute('requestParameters', $request->getParameters());
     $this->setAttribute('backUrl', $backUrl);
     $this->setAttribute('useCaptcha', $form->getDocumentService()->hasToUseCaptcha($form));
     $this->setAttribute('jQueryConditionalElement', $form->getDocumentService()->getJQueryForConditionalElementsOf($form));
 }
开发者ID:RBSWebFactory,项目名称:modules.form,代码行数:34,代码来源:BlockFormInputView.class.php

示例2: getInputView

 /**
  * @param form_persistentdocument_form $form
  * @param f_mvc_Request $request
  * @return String
  */
 protected function getInputView($form, $request)
 {
     $context = $this->getContext();
     FormHelper::addScriptsAndStyles($context);
     $previousModuleName = FormHelper::getModuleName();
     $moduleName = $this->getModuleName();
     FormHelper::setModuleName($moduleName);
     $contents = $this->getContentsFromRequest($form->getDocumentNode()->getChildren(), $request, $form);
     FormHelper::setModuleName($previousModuleName);
     $request->setAttribute('elements', $contents);
     $request->setAttribute('selfUrl', $_SERVER['REQUEST_URI']);
     if ($request->getParameter('backUrl')) {
         $backUrl = $request->getParameter('backUrl');
     } else {
         if (isset($_SERVER['HTTP_REFERER'])) {
             $backUrl = $_SERVER['HTTP_REFERER'];
         } else {
             $backUrl = website_WebsiteModuleService::getInstance()->getCurrentWebsite()->getUrl();
         }
     }
     $request->setAttribute('requestParameters', $request->getParameters());
     $request->setAttribute('backUrl', $backUrl);
     $request->setAttribute('useCaptcha', $form->getDocumentService()->hasToUseCaptcha($form));
     $request->setAttribute('jQueryConditionalElement', $form->getDocumentService()->getJQueryForConditionalElementsOf($form));
     return $this->getInputTemplateByFullName($form);
 }
开发者ID:RBSWebFactory,项目名称:modules.form,代码行数:31,代码来源:BlockFormBaseAction.class.php

示例3: execute

 /**
  * @param website_BlockActionRequest $request
  * @param website_BlockActionResponse $response
  */
 public function execute($request, $response)
 {
     FormHelper::addScriptsAndStyles($this->getPage());
 }
开发者ID:RBSWebFactory,项目名称:modules.form,代码行数:8,代码来源:FormLoadHandler.php


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