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


PHP Varien_Object::getType方法代码示例

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


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

示例1: render

 public function render(Varien_Object $row)
 {
     if ($row->getType() == 1) {
         return "<span class='grid-severity-notice' title='" . $row->getUseragent() . "'><span>" . Mage::helper('watchlog')->__("Success") . "</span></span>";
     } else {
         if ($row->getType() == 2) {
             return "<span class='grid-severity-minor' title='" . $row->getUseragent() . "'><span>" . Mage::helper('watchlog')->__("Blocked") . "</span></span>";
         } else {
             return "<span class='grid-severity-critical' title='" . $row->getUseragent() . "'><span>" . Mage::helper('watchlog')->__("Failed") . "</span></span>";
         }
     }
 }
开发者ID:buttasg,项目名称:cowgirlk,代码行数:12,代码来源:Status.php

示例2: render

 public function render(Varien_Object $row)
 {
     // not logged in => use subscriber data
     if ($row->getType() != 2) {
         $value = $row->getSubscriberGender();
     } elseif (Mage::getStoreConfig('newsletterextended/fields/customer_override')) {
         // fallback enabled => fallback to customer data if no data found in subscriber
         if (Mage::getStoreConfig('newsletterextended/fields/customer_fallback')) {
             $value = $row->getSubscriberGender() ? $row->getSubscriberGender() : $row->getCustomerGender();
         } else {
             $value = $row->getSubscriberGender();
         }
     } else {
         $value = $row->getCustomerGender();
     }
     // fix strange values (dunno where they come from)
     $options = $this->getColumn()->getOptions();
     if ($value == 123) {
         $value = 1;
     } else {
         if ($value == 124) {
             $value = 2;
         }
     }
     return isset($options[$value]) ? $options[$value] : '---';
 }
开发者ID:technomagegithub,项目名称:colb2b,代码行数:26,代码来源:Gender.php

示例3: render

 public function render(Varien_Object $row)
 {
     $url = $this->getUrl('*/*/editConfig', array('theme_id' => $row->getId()));
     $tr_class = 'ConfigType-' . $row->getType();
     return '<button class="edit-btn" data-parent-tr-class="' . $tr_class . '" type="button" title="Edit" onclick="return reloadTo(\'' . $url . '\');"><i class="fa fa-pencil-square-o"></i>
                     ' . (Mage::getSingleton('admin/session')->isAllowed('meigee/thememanager/edit') ? Mage::helper('catalog')->__('Edit') : Mage::helper('catalog')->__('View')) . '</button>';
 }
开发者ID:kiutisuperking,项目名称:eatsmartboxdev,代码行数:7,代码来源:Meigee_Thememanager_Block_Adminhtml_ConfigList_Renderer_Edit.php

示例4: _prepareForm

 protected function _prepareForm()
 {
     $form = new Varien_Data_Form();
     if (Mage::registry('gomage_feed')) {
         $item = Mage::registry('gomage_feed');
     } else {
         $item = new Varien_Object();
     }
     $this->setForm($form);
     $fieldset = $form->addFieldset('main_fieldset', array('legend' => $this->__('Item information')));
     $headerBar = $this->getLayout()->createBlock('adminhtml/widget_button')->setData(array('label' => Mage::helper('catalog')->__('Feed Pro Help'), 'class' => 'go', 'id' => 'feed_pro_help', 'onclick' => 'window.open(\'http://www.gomage.com/faq/extensions/feed-pro\')'));
     $fieldset->setHeaderBar($headerBar->toHtml());
     $fieldset->addField('type', 'hidden', array('name' => 'type'));
     $fieldset->addField('name', 'text', array('name' => 'name', 'label' => $this->__('Name'), 'title' => $this->__('Name'), 'required' => true, 'note' => $this->__('e.g. "Google Base", "Yahoo! Store"...')));
     if ($item->getId() && ($url = $item->getUrl())) {
         $fieldset->addField('comments', 'note', array('label' => $this->__('Access Url'), 'title' => $this->__('Access Url'), 'text' => '<a href="' . $url . '" target="_blank">' . $url . '</a>'));
     }
     $fieldset->addField('filename', 'text', array('name' => 'filename', 'label' => $this->__('Filename'), 'title' => $this->__('Filename'), 'required' => false, 'note' => $this->__('e.g. "productfeed.csv", "productfeed.xml"...')));
     $fieldset->addField('store_id', 'select', array('label' => $this->__('Store View'), 'required' => true, 'name' => 'store_id', 'values' => Mage::getModel('gomage_feed/adminhtml_system_config_source_store')->getStoreValuesForForm()));
     if (!$item->getType() && $this->getRequest()->getParam('type')) {
         $item->setType($this->getRequest()->getParam('type'));
     }
     $form->setValues($item->getData());
     return parent::_prepareForm();
 }
开发者ID:naz-ahmed,项目名称:ndap-magento-mirror,代码行数:25,代码来源:Main.php

示例5: render

 public function render(Varien_Object $row)
 {
     if ($row->getType() == 1) {
         return 'Status Change';
     } else {
         return 'Image Change';
     }
 }
开发者ID:bogdy2p,项目名称:apstufgnto,代码行数:8,代码来源:Type.php

示例6: getPaymentType

 /**
  * Return the PayPal payment type
  *
  * @return mixed
  */
 public function getPaymentType()
 {
     $object = new Varien_Object();
     $object->setType($this->_getConfig('payment_type'));
     // Specific event for this method
     Mage::dispatchEvent('gene_paypal_get_payment_type', array('object' => $object));
     return $object->getType();
 }
开发者ID:kiutisuperking,项目名称:eatsmartboxdev,代码行数:13,代码来源:Paypal.php

示例7: render

 public function render(Varien_Object $row)
 {
     if ($row->getType() != 2) {
         $value = $row->getThememanagerSubscriberLastname();
     } else {
         $value = $row->getCustomerLastname() ? $row->getCustomerLastname() : $row->getThememanagerSubscriberLastname();
     }
     return $value ? $value : '----';
 }
开发者ID:kiutisuperking,项目名称:eatsmartboxdev,代码行数:9,代码来源:Lastname.php

示例8: render

 public function render(Varien_Object $row)
 {
     $configuration = array();
     if ($row->getType() == Xtento_OrderExport_Model_Destination::TYPE_LOCAL) {
         $configuration['directory'] = $row->getPath();
     }
     if ($row->getType() == Xtento_OrderExport_Model_Destination::TYPE_FTP || $row->getType() == Xtento_OrderExport_Model_Destination::TYPE_SFTP) {
         $configuration['server'] = $row->getHostname() . ':' . $row->getPort();
         $configuration['username'] = $row->getUsername();
         $configuration['path'] = $row->getPath();
     }
     if ($row->getType() == Xtento_OrderExport_Model_Destination::TYPE_EMAIL) {
         $configuration['from'] = $row->getEmailSender();
         $configuration['to'] = $row->getEmailRecipient();
         $configuration['subject'] = $row->getEmailSubject();
     }
     if ($row->getType() == Xtento_OrderExport_Model_Destination::TYPE_CUSTOM) {
         $configuration['class'] = $row->getCustomClass();
     }
     if ($row->getType() == Xtento_OrderExport_Model_Destination::TYPE_WEBSERVICE) {
         $configuration['class'] = 'Webservice';
         $configuration['function'] = $row->getCustomFunction();
     }
     if (!empty($configuration)) {
         $configurationHtml = '';
         foreach ($configuration as $key => $value) {
             $configurationHtml .= Mage::helper('xtento_orderexport')->__(ucfirst($key)) . ': <i>' . Mage::helper('xtcore/core')->escapeHtml($value) . '</i><br/>';
         }
         return $configurationHtml;
     } else {
         return '---';
     }
 }
开发者ID:AleksNesh,项目名称:pandora,代码行数:33,代码来源:Configuration.php

示例9: render

 /**
  * {@inheritdoc}
  */
 public function render(Varien_Object $row)
 {
     $id = $row->getMessageId();
     $executed = $row->getExecuted();
     if (!$id && $executed) {
         return __('Pending');
     }
     if (!$id & $row->getType() == 'import') {
         $id = SixBySix_RealTimeDespatch_Model_Resource_Request_Line_Collection::getNextSequencesId($row->getEntity());
     }
     if (!$id) {
         $id = __('Pending');
     }
     return $id;
 }
开发者ID:pierre-pizzetta,项目名称:orderflow-magento-module,代码行数:18,代码来源:ID.php

示例10: render

 public function render(Varien_Object $row)
 {
     // not logged in => use subscriber data
     if ($row->getType() != 2) {
         $value = $row->getSubscriberSuffix();
     } elseif (Mage::getStoreConfig('newsletterextended/fields/customer_override')) {
         // fallback enabled => fallback to customer data if no data found in subscriber
         if (Mage::getStoreConfig('newsletterextended/fields/customer_fallback')) {
             $value = $row->getSubscriberSuffix() ? $row->getSubscriberSuffix() : $row->getCustomerSuffix();
         } else {
             $value = $row->getSubscriberSuffix();
         }
     } else {
         $value = $row->getCustomerSuffix();
     }
     return $value ? $value : '---';
 }
开发者ID:technomagegithub,项目名称:colb2b,代码行数:17,代码来源:Suffix.php

示例11: render

 /**
  * Render information about menu item
  *
  * @param   Varien_Object $row
  * @return  string
  */
 public function render(Varien_Object $row)
 {
     $helper = Mage::helper('menu');
     switch ($row->getType()) {
         case VF_CustomMenu_Model_Resource_Menu_Attribute_Source_Type::LINK_INTERNAL:
             return '<strong>' . $helper->__('Path') . ':</strong> ' . $row->getUrl();
             break;
         case VF_CustomMenu_Model_Resource_Menu_Attribute_Source_Type::LINK_EXTERNAL:
             return '<strong>' . $helper->__('Link') . ':</strong> ' . $row->getUrl();
             break;
         case VF_CustomMenu_Model_Resource_Menu_Attribute_Source_Type::CATEGORY:
             return '<strong>' . $helper->__('Category') . ':</strong> ' . Mage::getModel('catalog/category')->load($row->getDefaultCategory(), array('name'))->getName() . ' <strong>' . $helper->__('Show Children') . ':</strong> ' . ($row->getShowChildren() ? $helper->__('Yes') : $helper->__('No')) . ($row->getUrl() ? ' <strong>' . $helper->__('Path') . ':</strong> ' . $row->getUrl() : '');
             break;
         case VF_CustomMenu_Model_Resource_Menu_Attribute_Source_Type::ATTRIBUTE:
             return '<strong>' . $helper->__('Attribute code') . ':</strong> ' . $row->getSourceAttribute() . ' <strong>' . $helper->__('Category') . ':</strong> ' . Mage::getModel('catalog/category')->load($row->getDefaultCategory(), array('name'))->getName();
             break;
         default:
             return '';
     }
 }
开发者ID:xxorax,项目名称:VF_CustomMenu,代码行数:26,代码来源:Info.php

示例12: assignData

 public function assignData($data)
 {
     if (!$data instanceof Varien_Object) {
         $data = new Varien_Object($data);
     }
     $cardToken = $data->getCardToken();
     $ipAddress = $data->getIpAddress();
     $offlineTransId = $data->getOfflineTransactionId();
     $type = $data->getType();
     if (empty($cardToken) || empty($ipAddress)) {
         Mage::log('Payment could not be processed. Missing card token or IP', Zend_Log::ERR, self::$logFile);
         Mage::throwException(Mage::helper('pinpay')->__(self::GENERIC_PAYMENT_GATEWAY_ERROR));
     }
     // Store the authorised card token and customer IP
     $this->getInfoInstance()->setAdditionalInformation("card_token", $data->getCardToken());
     $this->getInfoInstance()->setAdditionalInformation("ip_address", $data->getIpAddress());
     // Store the offline transaction ID if supplied
     if (Mage::app()->getStore()->isAdmin() && !empty($offlineTransId) && $type == self::OFFLINE) {
         $this->getInfoInstance()->setAdditionalInformation("offline_transaction_id", $offlineTransId);
     }
     return $this;
 }
开发者ID:andrew-dwyer,项目名称:PINpayments,代码行数:22,代码来源:PaymentMethod.php

示例13: _prepareForm

 protected function _prepareForm()
 {
     $form = new Varien_Data_Form();
     if (Mage::registry('ranvi_feed')) {
         $item = Mage::registry('ranvi_feed');
     } else {
         $item = new Varien_Object();
     }
     $this->setForm($form);
     $fieldset = $form->addFieldset('main_fieldset', array('legend' => $this->__('Item information')));
     $fieldset->addField('type', 'hidden', array('name' => 'type'));
     $fieldset->addField('name', 'text', array('name' => 'name', 'label' => $this->__('Name'), 'title' => $this->__('Name'), 'required' => true));
     if ($item->getId() && ($url = $item->getUrl())) {
         $fieldset->addField('comments', 'note', array('label' => $this->__('Access Url'), 'title' => $this->__('Access Url'), 'text' => '<a href="' . $url . '" target="_blank">' . $url . '</a>'));
     }
     $fieldset->addField('filename', 'text', array('name' => 'filename', 'label' => $this->__('Filename'), 'title' => $this->__('Filename'), 'required' => false));
     $fieldset->addField('store_id', 'select', array('label' => $this->__('Store View'), 'required' => true, 'name' => 'store_id', 'values' => Mage::getModel('ranvi_feed/adminhtml_system_config_source_store')->getStoreValuesForForm()));
     if (!$item->getType() && $this->getRequest()->getParam('type')) {
         $item->setType($this->getRequest()->getParam('type'));
     }
     $form->setValues($item->getData());
     return parent::_prepareForm();
 }
开发者ID:mSupply,项目名称:runnable_test_repo,代码行数:23,代码来源:Main.php

示例14: _prepareForm

 protected function _prepareForm()
 {
     $form = new Varien_Data_Form();
     if (Mage::registry('gomage_custom_attribute')) {
         $item = Mage::registry('gomage_custom_attribute');
     } else {
         $item = new Varien_Object();
     }
     $this->setForm($form);
     $fieldset = $form->addFieldset('main_fieldset', array('legend' => $this->__('Attribute Information')));
     $fieldset->addField('type', 'hidden', array('name' => 'type'));
     $headerBar = $this->getLayout()->createBlock('adminhtml/widget_button')->setData(array('label' => Mage::helper('catalog')->__('Feed Pro Help'), 'class' => 'go', 'id' => 'feed_pro_help', 'onclick' => 'window.open(\'http://www.gomage.com/faq/extensions/feed-pro\')'));
     $fieldset->setHeaderBar($headerBar->toHtml());
     $fieldset->addField('code', 'text', array('name' => 'code', 'label' => $this->__('Dynamic Attribute Code'), 'title' => $this->__('Dynamic Attribute Code'), 'required' => true, 'class' => 'validate-code', 'note' => $this->__('For internal use. Must be unique with no spaces')));
     $fieldset->addField('name', 'text', array('name' => 'name', 'label' => $this->__('Name'), 'title' => $this->__('Name'), 'required' => true, 'note' => $this->__('e.g. "Custom Price", "Google Category"...')));
     if (!$item->getType() && $this->getRequest()->getParam('type')) {
         $item->setType($this->getRequest()->getParam('type'));
     }
     if ($item->getId()) {
         $form->setValues($item->getData());
     }
     return parent::_prepareForm();
 }
开发者ID:naz-ahmed,项目名称:ndap-magento-mirror,代码行数:23,代码来源:Main.php

示例15: processDownload

 public function processDownload($resource, Varien_Object $item)
 {
     $this->_resourceFile = $resource;
     $response = Mage::app()->getResponse();
     $response->setHttpResponseCode(200)->setHeader('Pragma', 'public', true)->setHeader('Cache-Control', 'must-revalidate, post-check=0, pre-check=0', true)->setHeader('Content-type', $this->getContentType(), true);
     if ($fileSize = $this->_getHandle()->streamStat('size')) {
         $response->setHeader('Content-Length', $fileSize);
     }
     $contentDisposition = $this->getContentType() == 'application/pdf' || strtolower($item->getType()) == 'pdf' ? 'inline' : 'attachment';
     $response->setHeader('Content-Disposition', $contentDisposition . '; filename=' . $this->getFileName($item));
     $response->clearBody();
     $response->sendHeaders();
     $this->output();
 }
开发者ID:CE-Webmaster,项目名称:CE-Hub,代码行数:14,代码来源:Data.php


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