當前位置: 首頁>>代碼示例>>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;未經允許,請勿轉載。