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


PHP XLite::getFormId方法代码示例

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


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

示例1: getFormButtons

 /**
  * Return list of the "Button" widgets
  *
  * @return array
  */
 protected function getFormButtons()
 {
     $result = parent::getFormButtons();
     if ($this->getModule() && 'CDev\\Bestsellers' == $this->getModule()->getActualName()) {
         $result['sales_calculation'] = new \XLite\View\Button\Link(array(\XLite\View\Button\AButton::PARAM_LABEL => 'Sales calculation', \XLite\View\Button\Link::PARAM_LOCATION => $this->buildURL('sales_calculation', 'sales', array(\XLite::FORM_ID => \XLite::getFormId())), \XLite\View\Button\AButton::PARAM_STYLE => 'action always-enabled'));
     }
     return $result;
 }
开发者ID:kirkbauer2,项目名称:kirkxc,代码行数:13,代码来源:ModuleSettings.php

示例2: getDefaultFieldValue

 /**
  * getDefaultFieldValue
  *
  * @param string $name Field name
  *
  * @return mixed
  */
 public function getDefaultFieldValue($name)
 {
     $value = parent::getDefaultFieldValue($name);
     switch ($name) {
         case 'added':
         case 'last_login':
             if (0 < $value) {
                 $value = date('r', $value);
             } else {
                 $value = 'never';
             }
             break;
         case 'referer':
             $value = $value ?: 'unknown';
             break;
         case 'orders_count':
             if ($value) {
                 $url = $this->buildURL('order_list', 'searchByCustomer', array('profileId' => $this->getModelObject()->getProfileId(), \XLite::FORM_ID => \XLite::getFormId()));
                 $value = '<a href="' . $url . '">' . $value . '</a>';
             } else {
                 $value = 'n/a';
             }
             break;
         case 'language':
             $lng = $value ? \XLite\Core\Database::getRepo('XLite\\Model\\Language')->findOneByCode($value) : null;
             $value = isset($lng) ? $lng->getName() : $value;
             break;
         case 'pending_membership_id':
             $value = 0 < $value ? $this->getModelObject()->getPendingMembership()->getName() : static::t('none');
             break;
         case 'roles':
             if ($this->getModelObject() && \XLite\Core\Auth::getInstance()->isPermissionAllowed(\XLite\Model\Role\Permission::ROOT_ACCESS) && \XLite\Core\Auth::getInstance()->getProfile()->getProfileId() == $this->getModelObject()->getProfileId()) {
                 if ($value) {
                     $roles = array();
                     /** @var \XLite\Model\Role $role */
                     foreach ($value as $role) {
                         $roles[] = $role->getPublicName();
                     }
                     $value = implode(', ', $roles);
                 }
             }
             break;
         case 'forceChangePassword':
             $value = $this->isRegisterMode() ? true : $this->getModelObject()->getForceChangePassword();
             break;
         default:
     }
     return $value;
 }
开发者ID:kewaunited,项目名称:xcart,代码行数:56,代码来源:AdminMainAbstract.php

示例3: prepareURLParams

 /**
  * Return URL parameters to use in AJAX popup
  *
  * @return array
  */
 protected function prepareURLParams()
 {
     return array('target' => 'addon_install', 'action' => 'select_installation_type', \XLite::FORM_ID => \XLite::getFormId(true), 'widget' => '\\XLite\\View\\ModulesManager\\InstallationType', 'moduleIds' => $this->getModuleIds());
 }
开发者ID:kirkbauer2,项目名称:kirkxc,代码行数:9,代码来源:SelectInstallationType.php

示例4: getXliteFormIDText

 protected function getXliteFormIDText()
 {
     static $formId = null;
     if (!isset($formId)) {
         $formId = \XLite::getFormId();
     }
     return $formId;
 }
开发者ID:kirkbauer2,项目名称:kirkxc,代码行数:8,代码来源:FlexyCompiler.php

示例5: buildURL

 /**
  * Compose URL from target, action and additional params
  *
  * @param string  $target      Page identifier OPTIONAL
  * @param string  $action      Action to perform OPTIONAL
  * @param array   $params      Additional params OPTIONAL
  * @param boolean $forceCuFlag Force flag - use Clean URL OPTIONAL
  *
  * @return string
  */
 public function buildURL($target = '', $action = '', array $params = array(), $forceCuFlag = null)
 {
     if ('' !== $target && ('' !== $action || isset($params['action']) && '' !== $params['action'])) {
         $class = \XLite\Core\Converter::getControllerClass($target);
         $paramAction = isset($params['action']) ? $params['action'] : $action;
         if ($class && $class::needFormId() && !in_array($paramAction, $class::defineFreeFormIdActions())) {
             $params[\XLite::FORM_ID] = \XLite::getFormId(empty($params['static_form_id']));
         }
     }
     return \XLite\Core\Converter::buildURL($target, $action, $params, null, false, $forceCuFlag);
 }
开发者ID:kewaunited,项目名称:xcart,代码行数:21,代码来源:Handler.php

示例6: doActionUpdate

 /**
  * Save search conditions
  *
  * @return void
  */
 protected function doActionUpdate()
 {
     $select = array();
     foreach ((array) \XLite\Core\Request::getInstance()->select as $key => $value) {
         $select[] = 'select[]=' . $key;
     }
     $this->setHardRedirect();
     $this->setReturnURL(\XLite\Core\Request::getInstance()->{\XLite\View\Button\PopupProductSelector::PARAM_REDIRECT_URL} . '&' . implode('&', $select) . '&' . \XLite::FORM_ID . '=' . \XLite::getFormId(true));
 }
开发者ID:kirkbauer2,项目名称:kirkxc,代码行数:14,代码来源:ProductSelections.php

示例7: getFormParams

 /**
  * Return list of additional params
  *
  * @return array
  */
 protected function getFormParams()
 {
     $params = array_merge($this->getCommonFormParams(), $this->getParam(self::PARAM_FORM_PARAMS));
     if ($this->hasFormId()) {
         $params[\XLite::FORM_ID] = \XLite::getFormId();
     }
     if ('post' === $this->getParam(self::PARAM_FORM_METHOD)) {
         $this->setReturnURLParam($params);
     }
     return $params;
 }
开发者ID:kirkbauer2,项目名称:kirkxc,代码行数:16,代码来源:AForm.php

示例8: getValue

 /**
  * Return field value
  *
  * @return mixed
  */
 public function getValue()
 {
     return \XLite::getFormId();
 }
开发者ID:kirkbauer2,项目名称:kirkxc,代码行数:9,代码来源:FormId.php


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