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


PHP Request::setAction方法代码示例

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


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

示例1: outputMoveHref

 function outputMoveHref()
 {
     $request = new Request();
     $request->setView('MoveProducts');
     $request->setAction('MoveToProducts');
     return $request->getURL();
 }
开发者ID:KICHIRO20,项目名称:-Myproject_part1-,代码行数:7,代码来源:move_products_az.php

示例2: MailInfo

 /**
  * MailInfo constructor
  */
 function MailInfo()
 {
     global $application;
     $MR =& $application->getInstance('MessageResources');
     //initialize form data with null values when adding a new notification
     $this->currentNotificationId = modApiFunc("Notifications", "getCurrentNotificationId");
     if ($this->currentNotificationId == 'Add') {
         $this->notificationInfo = array('Id' => '', 'Name' => '', 'Subject' => '', 'Body' => '', 'JavascriptBody' => '', 'From_addr' => '', 'Email_Code' => '', 'Active' => 'checked', 'Action_id' => 1);
         $request = new Request();
         $request->setView('NotificationInfo');
         $request->setAction('AddNotification');
         $formAction = $request->getURL();
         $this->properties = array('SubmitButton' => $MR->getMessage('BTN_ADD'), 'FormAction' => $formAction);
     } else {
         //initialize form data with database values when editing the notification
         $this->notificationInfo = modApiFunc("Notifications", "getNotificationInfo", $this->currentNotificationId);
         if (sizeof($this->notificationInfo) == 1) {
             $this->notificationInfo = $this->notificationInfo[0];
             $this->notificationInfo['JavascriptBody'] = addcslashes(addslashes($this->notificationInfo['Body']), "..");
             $this->notificationInfo['Body'] = prepareHTMLDisplay($this->notificationInfo['Body']);
         } else {
             $this->currentNotificationId = 'Add';
             $this->notificationInfo = array('Id' => '', 'Name' => '', 'Subject' => '', 'Body' => '', 'JavascriptBody' => '', 'From_addr' => '', 'Email_Code' => '', 'Active' => 'checked', 'Action_id' => 1);
         }
         $request = new Request();
         $request->setView('NotificationInfo');
         $request->setAction('SaveNotification');
         $formAction = $request->getURL();
         $this->properties = array('SubmitButton' => $MR->getMessage('BTN_SAVE'), 'FormAction' => $formAction);
     }
     $this->actionsList = modApiFunc("Notifications", "getActionsList");
     $this->InfoTags = modApiFunc("Notifications", "getAvailableTagsList", $this->actionsList);
 }
开发者ID:KICHIRO20,项目名称:-Myproject_part1-,代码行数:36,代码来源:mail_info_az.php

示例3: getTag

 function getTag($tag)
 {
     $value = null;
     switch ($tag) {
         case 'Local_SetCurrencyLink':
             $r = new Request();
             $r->setView(CURRENT_REQUEST_URL);
             $r->setAction('SetDisplayCurrency');
             $r->setKey('currency_id', '%currency_id_value%');
             $value = $r->getURL();
             break;
         case 'Local_CurrencyName':
             $value = $this->_Currency['name'];
             break;
         case 'Local_CurrencySelected':
             $b = $this->_Currency['id'] == modApiFunc("Localization", "getSessionDisplayCurrency");
             $value = $b ? 'selected="selected"' : "";
             break;
         case 'Local_CurrencyId':
             $value = $this->_Currency['id'];
             break;
         case 'Local_Items':
             $value = $this->outputItems();
             break;
         case 'Local_CurrentCurrency':
             $value = modApiFunc("Localization", "getCurrencyCodeById", modApiFunc("Localization", "getSessionDisplayCurrency"));
             break;
         case 'Local_CurrencyCode':
             $value = $this->_Currency['code'];
             break;
     }
     return $value;
 }
开发者ID:KICHIRO20,项目名称:-Myproject_part1-,代码行数:33,代码来源:currency_selector_cz.php

示例4: getTag

 /**
  * @ describe the function ->getTag.
  */
 function getTag($tag)
 {
     global $application;
     $value = null;
     switch ($tag) {
         case 'EditLink':
             $request = new Request();
             $request->setAction('SetCurrentProductType');
             $request->setView('EditProductType');
             $request->setKey('type_id', $this->_type['id']);
             $value = $request->getURL();
             break;
         case 'TypeName':
             $value = $this->_type['name'];
             break;
         case 'TypeDescription':
             $value = '';
             if ($this->_type['description'] != '') {
                 $value = ' - ' . $this->_type['description'];
             }
             break;
         case 'ProductTypes':
             $value = $this->outputProductTypes();
             break;
         default:
             break;
     }
     return $value;
 }
开发者ID:KICHIRO20,项目名称:-Myproject_part1-,代码行数:32,代码来源:manage_product_types_az.php

示例5: output

 /**
  *
  */
 function output()
 {
     global $application;
     $request = new Request();
     $request->setView('AdminBackupDeleteProgress');
     $request->setAction('BackupDeleteAction');
     $ProgressBarFormAction = $request->getURL();
     $ImgQtyTotal = modApiFunc("Tools", "getImgQtyTotal");
     $DeletedImgQty = modApiFunc("Tools", "getDeletedImgQty");
     if ($ImgQtyTotal) {
         if ($ImgQtyTotal == $DeletedImgQty + 3) {
             $ProgressBarWidth = 400;
             modApiFunc("Tools", "unsetDeletedImgQty");
             modApiFunc("Tools", "unsetImgQtyTotal");
         } else {
             $ProgressBarWidth = floor($DeletedImgQty / $ImgQtyTotal * 400);
         }
     } else {
         $ProgressBarWidth = 0;
     }
     if (!is_dir($application->getAppIni('PATH_BACKUP_DIR') . modApiFunc("Tools", "getCurrentBackupFile") . "/")) {
         $ProgressBarWidth = 400;
         modApiFunc("Tools", "unsetDeletedImgQty");
         modApiFunc("Tools", "unsetImgQtyTotal");
     }
     modApiFunc("Tools", "saveState");
     $template_contents = array('ProgressBarFormAction' => $ProgressBarFormAction, 'ProgressBarWidth' => $ProgressBarWidth);
     $this->_Template_Contents = $template_contents;
     $application->registerAttributes($this->_Template_Contents);
     return modApiFunc('TmplFiller', 'fill', "tools/backup_delete_progress/", "container.tpl.html", array());
 }
开发者ID:KICHIRO20,项目名称:-Myproject_part1-,代码行数:34,代码来源:backup_delete_progress_az.php

示例6: getReviewTagValue

 /**
  * Returns Review info tag value
  */
 function getReviewTagValue($tag)
 {
     $output = '';
     // if productid is incorrect returns '' in any case
     if ($this->_productid_invalid) {
         return '';
     }
     switch ($tag) {
         case 'number':
             $output = modApiFunc('Customer_Reviews', 'getProductCustomerReviewNumber', $this->_productid);
             if (!$this->checkReviewAvail(6, 7)) {
                 $output = 0;
             }
             break;
         case 'averagerating':
             $output = modApiFunc('Customer_Reviews', 'getTotalProductRating', $this->_productid);
             $output = $output['total_rating'];
             if (!$this->checkReviewAvail(7)) {
                 $output = 0;
             }
             break;
         case 'link':
             $cid = modApiFunc('CProductListFilter', 'getCurrentCategoryId');
             $r = new Request();
             $r->setView('ProductInfo');
             $r->setAction('SetCurrentProduct');
             $r->setKey('prod_id', $this->_productid);
             $r->setProductID($this->_productid);
             $r->setCategoryID($cid);
             $r->setAnchor('customer_reviews_' . $this->_productid);
             return $r->getURL();
     }
     return $output;
 }
开发者ID:KICHIRO20,项目名称:-Myproject_part1-,代码行数:37,代码来源:product_review_info.php

示例7: formAction

 function formAction()
 {
     global $application;
     $request = new Request();
     $request->setView('EditTaxName');
     $request->setAction('UpdateTaxNameAction');
     return $request->getURL();
 }
开发者ID:KICHIRO20,项目名称:-Myproject_part1-,代码行数:8,代码来源:tax-settings-edit-name-az.php

示例8: formAction

 function formAction()
 {
     global $application;
     $request = new Request();
     $request->setView('EditTaxRate');
     $request->setAction($this->ViewState["TaxRateAction"]);
     return $request->getURL();
 }
开发者ID:KICHIRO20,项目名称:-Myproject_part1-,代码行数:8,代码来源:tax-settings-edit-rate-az.php

示例9: redirect

 /**
  * Redirect after action
  */
 function redirect()
 {
     global $application;
     $request = new Request();
     $request->setView('EditPromoCode');
     $request->setAction('SetEditablePromoCode');
     $request->setKey('PromoCode_id', $this->pcid);
     $application->redirect($request);
 }
开发者ID:KICHIRO20,项目名称:-Myproject_part1-,代码行数:12,代码来源:update_promo_code_info_action.php

示例10: getTag

 function getTag($tag)
 {
     $value = null;
     switch ($tag) {
         case 'Local_FormActionURL':
             $r = new Request();
             $r->setView('CustomerChangePassword');
             $r->setAction('change_account_password');
             $value = $r->getURL();
             break;
     }
     return $value;
 }
开发者ID:KICHIRO20,项目名称:-Myproject_part1-,代码行数:13,代码来源:customer_change_password_form_cz.php

示例11: output

 /**
  *
  */
 function output()
 {
     global $application;
     loadCoreFile('html_form.php');
     $HtmlForm = new HtmlForm();
     $request = new Request();
     $request->setView('DateTimeFormat');
     $request->setAction('UpdateDateTimeFormat');
     $formAction = $request->getURL();
     $template_contents = array("FORM" => $HtmlForm->genForm($formAction, "POST", "DateTimeForm"), "DateFormats" => $this->outputDateTimeFormats("date"), "TimeFormats" => $this->outputDateTimeFormats("time"), "ResultMessage" => $this->outputResultMessage());
     $this->_Template_Contents = $template_contents;
     $application->registerAttributes($this->_Template_Contents);
     return modApiFunc('TmplFiller', 'fill', "localization/date_settings/", "container.tpl.html", array());
 }
开发者ID:KICHIRO20,项目名称:-Myproject_part1-,代码行数:17,代码来源:date_settings_az.php

示例12: output

 /**
  *
  */
 function output()
 {
     global $application;
     loadCoreFile('html_form.php');
     $HtmlForm = new HtmlForm();
     $request = new Request();
     $request->setView('WeightUnit');
     $request->setAction('UpdateWeightUnit');
     $formAction = $request->getURL();
     $template_contents = array("FORM" => $HtmlForm->genForm($formAction, "POST", "WeightForm"), "WeightUnit" => modApiFunc("Localization", "getValue", "WEIGHT_UNIT"), "WeightCoeff" => modApiFunc("Localization", "FloatToFormatStr", modApiFunc("Localization", "getValue", "WEIGHT_COEFF"), "weight_coeff"), "CoeffFormat" => modApiFunc("Localization", "format_settings_for_js", "weight_coeff"), "ResultMessage" => $this->outputResultMessage());
     $this->_Template_Contents = $template_contents;
     $application->registerAttributes($this->_Template_Contents);
     return modApiFunc('TmplFiller', 'fill', "localization/weight_settings/", "container.tpl.html", array());
 }
开发者ID:KICHIRO20,项目名称:-Myproject_part1-,代码行数:17,代码来源:weight_settings_az.php

示例13: output

 /**
  *
  */
 function output()
 {
     global $application;
     $this->_tmplFiller =& $application->getInstance('TmplFiller');
     $request = new Request();
     $request->setView(CURRENT_REQUEST_URL);
     $request->setAction('do_newsletter_delete');
     $self_url = $request->getURL();
     $self_url = "{$self_url}&letter_id=";
     $templateContents = array('MessagesList' => $this->outputMessagesList(), 'SelfUrl' => $self_url);
     $this->_templateContents = $templateContents;
     $application->registerAttributes($this->_templateContents);
     $result = $this->_tmplFiller->fill('newsletter/', 'list.tpl.html', array());
     return $result;
 }
开发者ID:KICHIRO20,项目名称:-Myproject_part1-,代码行数:18,代码来源:newsletter_list_az.php

示例14: getLinkToView

 /**
  * Outputs references to the category.
  */
 function getLinkToView($cid, $view_name, &$cat_info)
 {
     $_request = new Request();
     $_request->setView($view_name);
     $_request->setAction("SetCurrCat");
     $_request->setKey("category_id", $cid);
     $res = $_request->getURL();
     if ($cat_info->getCategoryTagValue('RecursiveStatus') == CATEGORY_STATUS_ONLINE) {
     } else {
         $res = $res . '" style="color: rgb(175, 175, 175);';
     }
     return $res;
     //@ check, whether last parameter was ever used
     //$application->href($_request, -1, -1, 'AdminZone');
 }
开发者ID:KICHIRO20,项目名称:-Myproject_part1-,代码行数:18,代码来源:breadcrumb-az.php

示例15: output

 /**
  *
  */
 function output()
 {
     global $application;
     $request = new Request();
     $request->setView('AdminBackupProgress');
     $request->setAction('DBStat');
     $Backup_Start_Link = $request->getURL();
     $request = new Request();
     $request->setView('AdminBackup');
     $request->setAction('BackupCancel');
     $Backup_Cancel_Link = $request->getURL();
     $template_contents = array('BackupStartLink' => $Backup_Start_Link, 'BackupCancelLink' => $Backup_Cancel_Link);
     $this->_Template_Contents = $template_contents;
     $application->registerAttributes($this->_Template_Contents);
     return modApiFunc('TmplFiller', 'fill', $this->container_template_folder_name, "container.tpl.html", array());
 }
开发者ID:KICHIRO20,项目名称:-Myproject_part1-,代码行数:19,代码来源:backup_create_az.php


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