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


PHP TopMessage::addInfo方法代码示例

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


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

示例1: doActionSwitch

 /**
  * Switch state
  *
  * @return void
  */
 protected function doActionSwitch()
 {
     $value = !\XLite\Core\Config::getInstance()->XC->ThemeTweaker->edit_mode;
     \XLite\Core\Database::getRepo('XLite\\Model\\Config')->createOption(array('category' => 'XC\\ThemeTweaker', 'name' => 'edit_mode', 'value' => $value));
     \XLite\Core\TopMessage::addInfo($value ? 'Webmaster mode is enabled' : 'Webmaster mode is disabled');
     $this->setReturnURL($this->buildURL('theme_tweaker_templates'));
 }
开发者ID:kirkbauer2,项目名称:kirkxc,代码行数:12,代码来源:ThemeTweakerTemplates.php

示例2: doActionUpdateInventoryProducts

 /**
  * doActionUpdateInventoryProducts
  *
  * @return void
  */
 protected function doActionUpdateInventoryProducts()
 {
     // Update price and other fields
     \XLite\Core\Database::getRepo('\\XLite\\Model\\Product')->updateInBatchById($this->getPostedData());
     // Update inventory
     \XLite\Core\Database::getRepo('\\XLite\\Model\\Inventory')->updateInBatchById($this->getPostedData());
     \XLite\Core\TopMessage::addInfo('Inventory has been successfully updated');
 }
开发者ID:kingsj,项目名称:core,代码行数:13,代码来源:Main.php

示例3: doActionDelete

 /**
  * doActionDelete
  *
  * @return void
  * @throws
  */
 protected function doActionDelete()
 {
     if (\Includes\Utils\FileManager::isExists($this->sqldumpFile) && !\Includes\Utils\FileManager::deleteFile($this->sqldumpFile)) {
         \XLite\Core\TopMessage::addError(static::t('Unable to delete file') . ' ' . $this->sqldumpFile);
     } else {
         \XLite\Core\TopMessage::addInfo('SQL file was deleted successfully');
     }
     $this->doRedirect();
 }
开发者ID:kirkbauer2,项目名称:kirkxc,代码行数:15,代码来源:DbBackup.php

示例4: doActionSaleCancelSale

 /**
  * Do action clone
  *
  * @return void
  */
 protected function doActionSaleCancelSale()
 {
     $select = \XLite\Core\Request::getInstance()->select;
     if ($select && is_array($select)) {
         \XLite\Core\Database::getRepo('\\XLite\\Model\\Product')->updateInBatchById($this->getUpdateInfo());
         \XLite\Core\TopMessage::addInfo('Products information has been successfully updated');
     } else {
         \XLite\Core\TopMessage::addWarning('Please select the products first');
     }
 }
开发者ID:kewaunited,项目名称:xcart,代码行数:15,代码来源:ProductList.php

示例5: doActionSetSalePrice

 /**
  * Set sale price parameters for products list
  *
  * @return void
  */
 protected function doActionSetSalePrice()
 {
     $form = new \XLite\Module\CDev\Sale\View\Form\SaleSelectedDialog();
     $form->getRequestData();
     if ($form->getValidationMessage()) {
         \XLite\Core\TopMessage::addError($form->getValidationMessage());
     } else {
         \XLite\Core\Database::getRepo('\\XLite\\Model\\Product')->updateInBatchById($this->getUpdateInfo());
         \XLite\Core\TopMessage::addInfo('Products information has been successfully updated');
     }
     $this->setReturnURL($this->buildURL('product_list', '', array('mode' => 'search')));
 }
开发者ID:kirkbauer2,项目名称:kirkxc,代码行数:17,代码来源:SaleSelected.php

示例6: processAddItemSuccess

 /**
  * Process 'Add item' success
  *
  * @return void
  */
 protected function processAddItemSuccess()
 {
     // todo: rewrite add2cartPopup top message block
     // parent::processAddItemSuccess();
     if (\XLite\Module\CDev\Paypal\Main::isExpressCheckoutEnabled()) {
         if (!\XLite\Core\Request::getInstance()->expressCheckout) {
             \XLite\Core\TopMessage::addInfo(new \XLite\Module\CDev\Paypal\View\Button\TopMessage\ExpressCheckout());
         }
     } else {
         parent::processAddItemSuccess();
     }
 }
开发者ID:kewaunited,项目名称:xcart,代码行数:17,代码来源:Cart.php

示例7: doActionEgoodsRenew

 /**
  * Renew egood link
  *
  * @return void
  */
 protected function doActionEgoodsRenew()
 {
     $id = \XLite\Core\Request::GetInstance()->attachment_id;
     $attachment = \XLite\Core\Database::getRepo('XLite\\Module\\CDev\\Egoods\\Model\\OrderItem\\PrivateAttachment')->find($id);
     if (!$attachment) {
         \XLite\Core\TopMessage::addError('Download link did not found');
     } elseif (!$attachment->isActive()) {
         \XLite\Core\TopMessage::addError('Download link is not active');
     } else {
         $attachment->renew();
         \XLite\Core\Database::getEM()->flush();
         \XLite\Core\Mailer::sendEgoodsLinks($attachment->getItem()->getOrder());
         \XLite\Core\TopMessage::addInfo('Download link is renew');
     }
 }
开发者ID:kirkbauer2,项目名称:kirkxc,代码行数:20,代码来源:Order.php

示例8: doActionUpdatePinCodes

 /**
  * Update pin codes action handler
  *
  * @return void
  */
 public function doActionUpdatePinCodes()
 {
     $product = $this->getProduct();
     $product->setPinCodesEnabled((bool) \XLite\Core\Request::getInstance()->pins_enabled);
     $product->setAutoPinCodes(\XLite\Core\Request::getInstance()->autoPinCodes);
     if (\XLite\Core\Request::getInstance()->delete) {
         foreach (\XLite\Core\Request::getInstance()->delete as $id => $checked) {
             $obj = \XLite\Core\Database::getRepo('XLite\\Module\\CDev\\PINCodes\\Model\\PinCode')->findOneBy(array('id' => $id, 'product' => $product->getId(), 'isSold' => 0));
             if ($obj) {
                 \XLite\Core\Database::getEM()->remove($obj);
             }
         }
     }
     \XLite\Core\Database::getEM()->flush();
     \XLite\Core\TopMessage::addInfo('PIN codes data have been successfully updated');
 }
开发者ID:kewaunited,项目名称:xcart,代码行数:21,代码来源:Product.php

示例9: doActionSelectPageImage

 /**
  * Common handler for page images.
  *
  * @param string $methodToLoad Method to use for getting images
  * @param array  $paramsToLoad Parameters to use in image getter method
  *
  * @return void
  * @see    ____func_see____
  * @since  1.0.7
  */
 protected function doActionSelectPageImage($methodToLoad, array $paramsToLoad)
 {
     $pageId = intval(\XLite\Core\Request::getInstance()->objectId);
     $page = \XLite\Core\Database::getRepo('XLite\\Module\\CDev\\SimpleCMS\\Model\\Page')->find($pageId);
     $image = $page->getImage();
     if (!$image) {
         $image = new \XLite\Module\CDev\SimpleCMS\Model\Image\Page\Image();
     }
     if (call_user_func_array(array($image, $methodToLoad), $paramsToLoad)) {
         $image->setPage($page);
         $page->setImage($image);
         \XLite\Core\Database::getEM()->persist($image);
         \XLite\Core\Database::getEM()->flush();
         \XLite\Core\TopMessage::addInfo('The image has been updated');
     } else {
         \XLite\Core\TopMessage::addError('Failed to update page image');
     }
 }
开发者ID:kingsj,项目名称:core,代码行数:28,代码来源:SelectFile.php

示例10: doActionLocate

 /**
  * Place URL into engine's endpoints
  * 
  * @return void
  */
 protected function doActionLocate()
 {
     $engines = \XLite\Core\Request::getInstance()->engines;
     if ($engines) {
         foreach ($this->getEngines() as $key => $engine) {
             if (in_array($key, $engines)) {
                 $url = urlencode(\XLite::getInstance()->getShopURL(\XLite\Core\Converter::buildURL('sitemap', '', array(), \XLite::CART_SELF)));
                 $url = str_replace('%url%', $url, $engine['url']);
                 $request = new \XLite\Core\HTTP\Request($url);
                 $response = $request->sendRequest();
                 if (200 == $response->code) {
                     \XLite\Core\TopMessage::addInfo('Site map successfully registred on X', array('engine' => $key));
                 } else {
                     \XLite\Core\TopMessage::addWarning('Site map has not been registred in X', array('engine' => $key));
                 }
             }
         }
     }
 }
开发者ID:kingsj,项目名称:core,代码行数:24,代码来源:Sitemap.php

示例11: doActionUpdate

 /**
  * Do action 'Update'
  *
  * @return void
  */
 public function doActionUpdate()
 {
     $isUpdated = false;
     $postedData = \XLite\Core\Request::getInstance()->getData();
     $a2cpEnableForDropping = !empty($postedData['a2cp_enable_for_dropping']);
     if ($a2cpEnableForDropping != \XLite\Core\Config::getInstance()->XC->Add2CartPopup->a2cp_enable_for_dropping) {
         \XLite\Core\Database::getRepo('\\XLite\\Model\\Config')->createOption(array('category' => 'XC\\Add2CartPopup', 'name' => 'a2cp_enable_for_dropping', 'value' => $a2cpEnableForDropping ? 'Y' : 'N'));
         $isUpdated = true;
     }
     $options = array();
     if (isset($postedData['data']) && is_array($postedData['data'])) {
         foreach ($postedData['data'] as $code => $info) {
             $options[$code] = array('position' => $info['position'], 'enabled' => $info['enabled']);
         }
         \XLite\Core\Database::getRepo('\\XLite\\Model\\Config')->createOption(array('category' => 'XC\\Add2CartPopup', 'name' => 'product_sources', 'value' => serialize($options)));
         $isUpdated = true;
     }
     if ($isUpdated) {
         \XLite\Core\TopMessage::addInfo('Add to Cart popup module settings have been updated.');
     }
 }
开发者ID:kirkbauer2,项目名称:kirkxc,代码行数:26,代码来源:Add2CartPopup.php

示例12: doActionAdd

 /**
  * Apply coupon to the cart
  *
  * @return void
  */
 protected function doActionAdd()
 {
     $code = (string) \XLite\Core\Request::getInstance()->code;
     /** @var \XLite\Module\CDev\Coupons\Model\Coupon $coupon */
     $coupon = \XLite\Core\Database::getRepo('XLite\\Module\\CDev\\Coupons\\Model\\Coupon')->findOneByCode($code);
     $cart = $this->getCart();
     if ($coupon) {
         $error = $this->checkCompatibility($coupon, $cart);
     } else {
         $error = static::t('There is no such a coupon, please check the spelling: X', array('code' => $code));
     }
     if ('' === $error) {
         $cart->addCoupon($coupon);
         \XLite\Core\Database::getEM()->flush();
         $this->updateCart();
         \XLite\Core\TopMessage::addInfo('The coupon has been applied to your order');
     } elseif ($error) {
         \XLite\Core\Event::invalidElement('code', $error);
     }
     $this->setPureAction();
 }
开发者ID:kirkbauer2,项目名称:kirkxc,代码行数:26,代码来源:Coupon.php

示例13: doActionUpdate

 /**
  * Update payment method
  *
  * @return void
  */
 protected function doActionUpdate()
 {
     $settings = \XLite\Core\Request::getInstance()->settings;
     $m = $this->getPaymentMethod();
     if (!$m) {
         \XLite\Core\TopMessage::addError('An attempt to update settings of unknown payment method');
     } else {
         if (is_array($settings)) {
             foreach ($settings as $name => $value) {
                 $m->setSetting($name, $value);
             }
         }
         $properties = \XLite\Core\Request::getInstance()->properties;
         if (is_array($properties) && !empty($properties)) {
             $m->map($properties);
         }
         \XLite\Core\Database::getRepo('\\XLite\\Model\\Payment\\Method')->update($m);
         \XLite\Core\TopMessage::addInfo('The settings of payment method successfully updated');
         $this->setReturnURL($this->buildURL('payment_settings'));
     }
 }
开发者ID:kingsj,项目名称:core,代码行数:26,代码来源:PaymentMethod.php

示例14: doActionLocate

 /**
  * Place URL into engine's endpoints
  *
  * @return void
  */
 protected function doActionLocate()
 {
     $engines = \XLite\Core\Request::getInstance()->engines;
     if ($engines) {
         foreach ($this->getEngines() as $key => $engine) {
             if (in_array($key, $engines)) {
                 $url = urlencode(\XLite::getInstance()->getShopURL(\XLite\Core\Converter::buildURL('sitemap', '', array(), \XLite::getCustomerScript())));
                 $url = str_replace('%url%', $url, $engine['url']);
                 $request = new \XLite\Core\HTTP\Request($url);
                 $response = $request->sendRequest();
                 if (200 == $response->code) {
                     \XLite\Core\TopMessage::addInfo('Site map successfully registred on X', array('engine' => $key));
                 } else {
                     \XLite\Core\TopMessage::addWarning('Site map has not been registred in X', array('engine' => $key));
                 }
             }
         }
     }
     $postedData = \XLite\Core\Request::getInstance()->getData();
     $options = \XLite\Core\Database::getRepo('\\XLite\\Model\\Config')->findBy(array('category' => $this->getOptionsCategory()));
     $isUpdated = false;
     foreach ($options as $key => $option) {
         $name = $option->getName();
         $type = $option->getType();
         if (isset($postedData[$name]) || 'checkbox' == $type) {
             if ('checkbox' == $type) {
                 $option->setValue(isset($postedData[$name]) ? 'Y' : 'N');
             } else {
                 $option->setValue($postedData[$name]);
             }
             $isUpdated = true;
             \XLite\Core\Database::getEM()->persist($option);
         }
     }
     if ($isUpdated) {
         \XLite\Core\Database::getEM()->flush();
     }
 }
开发者ID:kirkbauer2,项目名称:kirkxc,代码行数:43,代码来源:Sitemap.php

示例15: doActionConfirm

 /**
  * doActionConfirm
  *
  * @return void
  */
 protected function doActionConfirm()
 {
     if ($this->get('email') && \XLite\Core\Request::getInstance()->request_id && $this->doPasswordRecovery($this->get('email'), \XLite\Core\Request::getInstance()->request_id)) {
         \XLite\Core\TopMessage::addInfo('Please create a new password');
         $this->setReturnURL($this->buildURL());
         \XLite\Core\Event::recoverPasswordDone(array('email' => $this->get('email')));
     }
 }
开发者ID:kirkbauer2,项目名称:kirkxc,代码行数:13,代码来源:RecoverPassword.php


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