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


PHP Varien_Object::getId方法代码示例

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


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

示例1: render

 public function render(Varien_Object $row)
 {
     $actions[] = array('url' => $this->getUrl('*/*/edit', array('item_id' => $row->getId())), 'caption' => Mage::helper('robots')->__('Edit'));
     $actions[] = array('url' => $this->getUrl('*/*/delete', array('item_id' => $row->getId())), 'caption' => Mage::helper('robots')->__('Delete'), 'confirm' => Mage::helper('robots')->__('Are you sure you want to delete this item ?'));
     $this->getColumn()->setActions($actions);
     return parent::render($row);
 }
开发者ID:macosxvn,项目名称:techheroes,代码行数:7,代码来源:Action.php

示例2: render

 public function render(Varien_Object $row)
 {
     $manage_stock = Mage::getStoreConfig("cataloginventory/item_options/manage_stock");
     if ($row->getManageStock() || $row->getUse_config_manage_stock() && $manage_stock) {
         if (in_array($row->getTypeId(), array('simple', 'virtual', 'downloadable'))) {
             $data = Mage::getModel('advancedinventory/stock')->getStockByProductIdAndPlaceId($row->getId(), $this->getColumn()->getPlaceId());
             $qty = (int) $data->getQuantityInStock();
             $enabled = $data->getManageStock();
             if (!$row->getMultistock_enabled()) {
                 $html = "-";
             } else {
                 if (!$enabled) {
                     return Mage::helper('advancedinventory')->__("X");
                 } else {
                     $html = "<input class='keydown inventory_input' value='" . $qty . "' / >";
                 }
                 if (Mage::helper("advancedinventory/data")->isBackorderable($data)) {
                     $html .= "<div title='Backorder allowed' class='ai-marker backorder'></div>";
                 }
             }
         } else {
             $html = "-";
         }
         return "<span class='PosQty' id='PosQty_" . $row->getId() . "_" . $this->getColumn()->getPlaceId() . "'>" . $html . "</span>";
     } else {
         return Mage::helper('advancedinventory')->__("X");
     }
 }
开发者ID:rcclaudrey,项目名称:dev,代码行数:28,代码来源:PosQty.php

示例3: render

 public function render(Varien_Object $row)
 {
     $inventoryShipments = Mage::getModel('inventoryplus/warehouse_shipment')->getCollection()->addFieldToFilter('order_id', $row->getId())->addFieldToFilter('qty_shipped', array('gt' => 0));
     $inventoryShipments->getSelect()->group('warehouse_id');
     $html = '';
     $htmlExport = '';
     $whs = Mage::helper('inventoryshipment')->getAllWarehouseName();
     if ($inventoryShipments->getSize() > 0) {
         foreach ($inventoryShipments as $inventoryShipment) {
             if ($inventoryShipment->getWarehouseId() != 0) {
                 $html .= '<a href="' . $this->getUrl('inventoryplusadmin/adminhtml_warehouse/edit', array('id' => $inventoryShipment->getWarehouseId())) . '" >' . $whs[$inventoryShipment->getWarehouseId()] . '</a><br/>';
                 $htmlExport .= $whs[$inventoryShipment->getWarehouseId()] . ',';
             }
         }
     } else {
         if (Mage::helper('core')->isModuleEnabled('Magestore_Inventorydropship')) {
             $dropship = Mage::getModel('inventorydropship/inventorydropship')->getCollection()->addFieldToFilter('order_id', $row->getId())->addFieldToFilter('status', array('neq' => 5))->getFirstItem();
             if ($dropship->getId()) {
                 $html = 'Use Dropship';
             } else {
                 $html .= 'None';
             }
         } else {
             $html .= 'None';
         }
     }
     $htmlExport = rtrim($htmlExport, ',');
     if (in_array(Mage::app()->getRequest()->getActionName(), array('exportCsv', 'exportExcel'))) {
         return $htmlExport;
     }
     return $html;
 }
开发者ID:cabrerabywaters,项目名称:magentoSunshine,代码行数:32,代码来源:Warehouse.php

示例4: getChilds

 /**
  * Getting all available childs for Invoice, Shipmen or Creditmemo item
  *
  * @param Varien_Object $item
  * @return array
  */
 public function getChilds($item)
 {
     $_itemsArray = array();
     if ($item instanceof Mage_Sales_Model_Order_Item) {
         $_items = $item->getOrder()->getAllItems();
     } else {
         if ($item instanceof Mage_Sales_Model_Order_Invoice_Item) {
             $_items = $item->getInvoice()->getAllItems();
         } else {
             if ($item instanceof Mage_Sales_Model_Order_Shipment_Item) {
                 $_items = $item->getShipment()->getAllItems();
             } else {
                 if ($item instanceof Mage_Sales_Model_Order_Creditmemo_Item) {
                     $_items = $item->getCreditmemo()->getAllItems();
                 }
             }
         }
     }
     if ($_items) {
         foreach ($_items as $_item) {
             $parentItem = $_item->getParentItem();
             if ($parentItem) {
                 $_itemsArray[$parentItem->getId()][$_item->getId()] = $_item;
             } else {
                 $_itemsArray[$_item->getId()][$_item->getId()] = $_item;
             }
         }
     }
     if (isset($_itemsArray[$item->getId()])) {
         return $_itemsArray[$item->getId()];
     } else {
         return null;
     }
 }
开发者ID:aniljaiswal,项目名称:order-confirmation,代码行数:40,代码来源:Item.php

示例5: render

 public function render(Varien_Object $row)
 {
     $var = '<script type="text/javascript">function loginradiusChangeRaasStatus(fieldId, url, event) {
         new Ajax.Request(url, {
     method: "POST",
     parameters: {lr_entity_id: fieldId},
     onSuccess: function (response) {
             document.getElementById("lr_block_unblock"+fieldId).textContent=response.responseText;
             return false;
         }
 });
 return false;}
 </script>';
     $url = Mage::getBaseUrl(Mage_Core_Model_Store::URL_TYPE_LINK) . 'customerregistration/';
     $connection = Mage::getSingleton('core/resource');
     $readConnection = $connection->getConnection('core_read');
     $tableName = $connection->getTableName('lr_sociallogin');
     $query = "select status from {$tableName} where entity_id= '" . $row->getId() . "'";
     $result = $readConnection->query($query)->fetch();
     $statusText = 'Block';
     if (is_array($result) && in_array('blocked', $result)) {
         $statusText = 'Unblock';
     } else {
         if (isset($result['status']) && $result['status'] == 'blocked') {
             $statusText = 'Unblock';
         }
     }
     return '<a href="#"><span id="lr_block_unblock' . $row->getId() . '" onclick="loginradiusChangeRaasStatus(' . $row->getId() . ', &quot;' . $url . '&quot;);">' . $statusText . '</span></a>' . $var;
 }
开发者ID:LoginRadius,项目名称:magento-identity-extension,代码行数:29,代码来源:Status.php

示例6: render

 public function render(Varien_Object $row)
 {
     $html = '<a href="#" onclick="editPopup(\'' . $row->getId() . '\'); return false;">' . $this->__('Edit') . '</a>';
     $html .= ' | ';
     $html .= '<a href="#" onclick="deleteAnswer(\'' . $row->getId() . '\'); return false;">' . $this->__('Delete') . '</a>';
     return $html;
 }
开发者ID:ramantalkin,项目名称:tmp01skin,代码行数:7,代码来源:Action.php

示例7: render

 public function render(Varien_Object $row)
 {
     $html = '';
     $manage_stock = Mage::getStoreConfig("cataloginventory/item_options/manage_stock");
     if ($row->getManageStock() || $row->getUse_config_manage_stock() && $manage_stock) {
         if (in_array($row->getTypeId(), array('simple', 'virtual', 'downloadable'))) {
             $permissions = Mage::helper('advancedinventory/permissions')->getUserPermissions();
             $all = $permissions->isAdmin();
             $pos = $permissions->getPos();
             if ($this->getStoreId()) {
                 $places = Mage::getModel('pointofsale/pointofsale')->getPlacesByStoreId($this->getStoreId());
             } else {
                 $places = Mage::getModel('pointofsale/pointofsale')->getPlaces();
             }
             $html = (int) 0;
             foreach ($places as $p) {
                 if (in_array($p->getPlaceId(), $pos) || $all) {
                     $data = Mage::getModel('advancedinventory/stock')->getStockByProductIdAndPlaceId($row->getId(), $p->getPlaceId());
                     $html += $data["quantity_in_stock"];
                 }
             }
         } else {
             $html = "-";
         }
         $enabled = $row->getMultistock_enabled() ? 'enabled' : 'disabled';
         return "<span class='GlobalQty' id='GlobalQty_" . $row->getId() . "' multistock='" . $enabled . "'>" . $html . "</span>";
     } else {
         return Mage::helper('advancedinventory')->__("X");
     }
 }
开发者ID:rcclaudrey,项目名称:dev,代码行数:30,代码来源:StoreViewQty.php

示例8: _prepareForm

 /**
  * Prepare form
  *
  * @return Mage_Adminhtml_Block_Widget_Form
  */
 protected function _prepareForm()
 {
     $model = Mage::registry('current_template');
     if (!$model) {
         $model = new Varien_Object();
     }
     $action = $this->getUrl('*/*/saveTemplate');
     $form = new Varien_Data_Form(array('id' => 'edit_form', 'action' => $action, 'method' => 'post', 'enctype' => 'multipart/form-data'));
     $form->setHtmlIdPrefix('template_');
     $fieldset = $form->addFieldset('edit_template', array('legend' => $this->__('Template')));
     $this->_addElementTypes($fieldset);
     if ($model->getId()) {
         $fieldset->addField('id', 'hidden', array('name' => 'id'));
         $fieldset->addField('template_id', 'hidden', array('name' => 'template_id'));
     }
     $fieldset->addField('application_id', 'select', array('name' => 'application_id', 'label' => $this->__('Application'), 'title' => $this->__('Application'), 'disabled' => $model->getId() || !$this->_fieldsEnabled ? true : false, 'values' => Mage::helper('xmlconnect')->getApplicationOptions(), 'note' => $this->__('Creating a Template is allowed only for applications which have device type iPhone.'), 'required' => true));
     $fieldset->addField('name', 'text', array('name' => 'name', 'label' => $this->__('Template Name'), 'title' => $this->__('Template Name'), 'required' => true, 'disabled' => $model->getId() || !$this->_fieldsEnabled ? true : false, 'note' => $this->__('Maximum length is 255'), 'maxlength' => 255));
     $fieldset->addField('push_title', 'text', array('name' => 'push_title', 'label' => $this->__('Push Title'), 'title' => $this->__('Push Title'), 'required' => true, 'disabled' => !$this->_fieldsEnabled ? true : false, 'note' => $this->__('Maximum length is 140'), 'maxlength' => 140));
     $this->_dependentFields['message_title'] = $fieldset->addField('message_title', 'text', array('name' => 'message_title', 'label' => $this->__('Message Title'), 'title' => $this->__('Message Title'), 'required' => true, 'disabled' => !$this->_fieldsEnabled ? true : false, 'note' => $this->__('Maximum length is 255'), 'maxlength' => 255));
     $widgetFilters = array('is_email_compatible' => 1);
     $wysiwygConfig = Mage::getSingleton('cms/wysiwyg_config')->getConfig(array('widget_filters' => $widgetFilters));
     $this->_dependentFields['content'] = $fieldset->addField('content', 'editor', array('label' => $this->__('Template Content'), 'title' => $this->__('Template Content'), 'name' => 'content', 'style' => 'height:30em;', 'state' => 'html', 'required' => true, 'disabled' => !$this->_fieldsEnabled ? true : false, 'config' => $wysiwygConfig));
     $form->setValues($model->getData());
     $form->setUseContainer(true);
     $this->setForm($form);
     return parent::_prepareForm();
 }
开发者ID:cewolf2002,项目名称:magento,代码行数:32,代码来源:Form.php

示例9: render

 public function render(Varien_Object $row)
 {
     $fields = array();
     try {
         $fields = unserialize($row->getFields());
     } catch (Exception $e) {
         //
     }
     if (empty($fields)) {
         return '';
     }
     $fieldsHtml = '<dl style="margin-top: 10px">';
     foreach ($fields as $field) {
         $fieldsHtml .= '<dt><strong>' . $field['name'] . '</strong></dt>';
         $fieldsHtml .= '
             <dd style="padding-left: 15px; padding-bottom: 10px">
                 <pre>' . htmlspecialchars($field['content']) . '</pre>
             </dd>
         ';
     }
     $fieldsHtml .= '</dl>';
     return '
         <a href="#" onclick="javascript:document.getElementById(\'fields-' . $row->getId() . '\').style.display = \'block\';">Show</a>
         <span style="color:#666">|</span>
         <a href="#" onclick="javascript:document.getElementById(\'fields-' . $row->getId() . '\').style.display = \'none\';">Hide</a>
         <div id="fields-' . $row->getId() . '" style="display: none">' . $fieldsHtml . '</div>
     ';
 }
开发者ID:bevello,项目名称:bevello,代码行数:28,代码来源:Fields.php

示例10: render

 public function render(Varien_Object $row)
 {
     $url = Mage::helper("adminhtml")->getUrl("quickpaypayment/order/", array("id" => $row->getId()));
     $image = Mage::helper('quickpaypayment')->getImage($row->getId());
     $content = $this->getLayout()->createBlock('core/template')->setTemplate('quickpaypayment/grid/fraudprobability.phtml')->setInfoUrl($url)->setImage($image)->toHtml();
     return $content;
 }
开发者ID:axovel,项目名称:easycarcare,代码行数:7,代码来源:Fraudprobability.php

示例11: render

 /**
  * Renders grid column
  *
  * @param   Varien_Object $row
  * @return  string
  */
 public function render(Varien_Object $row)
 {
     $readDetailsHtml = $row->getUrl() ? '<a target="_blank" href="' . $row->getUrl() . '">' . Mage::helper('Mage_AdminNotification_Helper_Data')->__('Read Details') . '</a> | ' : '';
     $markAsReadHtml = !$row->getIsRead() ? '<a href="' . $this->getUrl('*/*/markAsRead/', array('_current' => true, 'id' => $row->getId())) . '">' . Mage::helper('Mage_AdminNotification_Helper_Data')->__('Mark as Read') . '</a> | ' : '';
     $encodedUrl = $this->helper('Mage_Core_Helper_Url')->getEncodedUrl();
     return sprintf('%s%s<a href="%s" onClick="deleteConfirm(\'%s\', this.href); return false;">%s</a>', $readDetailsHtml, $markAsReadHtml, $this->getUrl('*/*/remove/', array('_current' => true, 'id' => $row->getId(), Mage_Core_Controller_Front_Action::PARAM_NAME_URL_ENCODED => $encodedUrl)), Mage::helper('Mage_AdminNotification_Helper_Data')->__('Are you sure?'), Mage::helper('Mage_AdminNotification_Helper_Data')->__('Remove'));
 }
开发者ID:nemphys,项目名称:magento2,代码行数:13,代码来源:Actions.php

示例12: render

 public function render(Varien_Object $row)
 {
     $values = $this->getColumn()->getValues();
     $value = $row->getData($this->getColumn()->getIndex());
     if ($this->getColumn()->getRadioValue() == '') {
         $checked = !in_array($row->getId(), $values) ? ' checked="checked"' : '';
     } elseif (is_array($values)) {
         $checked = in_array($row->getId(), $values) ? ' checked="checked"' : '';
     } else {
         $checked = $row->getId() === $this->getColumn()->getValue() ? ' checked="checked"' : '';
     }
     $disabled = '';
     if ($this->getColumn()->getDisabled()) {
         $disabled = ' disabled="disabled"';
     }
     $html = '<label><input type="radio" name="' . $this->getColumn()->getHtmlName() . '[' . $row->getId() . ']" ';
     $html .= 'value="' . $this->getColumn()->getRadioValue() . '" class="radio"' . $checked . $disabled . ' rawid=' . $row->getId() . ' />';
     $options = $this->getColumn()->getOptions();
     $optionsScope = $this->getColumn()->getOptionsScope();
     if (!empty($options) && is_array($options)) {
         if (isset($options[$value])) {
             $html .= $this->escapeHtml($options[$value]);
         }
     }
     $html .= '</label>';
     return $html;
 }
开发者ID:cabrerabywaters,项目名称:magentoSunshine,代码行数:27,代码来源:Radio.php

示例13: render

 /**
  * Renders grid column
  *
  * @param   Varien_Object $row
  * @return  string
  */
 public function render(Varien_Object $row)
 {
     $value = '';
     if ($barcodeProducts = Mage::getModel('admin/session')->getData('barcode_product_import')) {
         foreach ($barcodeProducts as $barcodeProduct) {
             if ($barcodeProduct['PRODUCT_ID'] == $row->getProductId()) {
                 if (isset($barcodeProduct['BARCODE']) && $barcodeProduct['BARCODE']) {
                     $value = $barcodeProduct['BARCODE'];
                 }
             }
         }
     }
     $checked = 'checked="checked"';
     if ($value) {
         $checked = '';
     }
     $html = Mage::helper('inventorybarcode')->__('Auto') . ': <input onclick="setBarcodeAuto(this,\'barcode-' . $row->getId() . '\')" type="checkbox" name="barcode_auto" ' . $checked . ' value="">';
     $html .= '<input type="text" ';
     $html .= 'id="barcode-' . $row->getId() . '" ';
     $html .= 'name="' . $this->getColumn()->getId() . '" ';
     $html .= 'value="' . $value . '"';
     $html .= 'class="input-text' . $this->getColumn()->getInlineCss() . '" readonly />';
     //        $html .= '<p class="note" id="note_barcode"><span>'.Mage::helper('inventory')->__('Just [A-Z][a-z][0-9] are allowed').'</span></p>';
     return $html;
 }
开发者ID:cabrerabywaters,项目名称:magentoSunshine,代码行数:31,代码来源:Custom.php

示例14: render

 public function render(Varien_Object $_15ded6f30a13ef74e4a6288cd249a3be115e0ad0)
 {
     $_b4b4ae1cce58b916954ba6a30ef73681af8a36c4 = array();
     $_b4b4ae1cce58b916954ba6a30ef73681af8a36c4[] = array('@' => array('href' => $this->getUrl('adminhtml/customer/edit', array('id' => $_15ded6f30a13ef74e4a6288cd249a3be115e0ad0->getEntityId())), 'target' => '_blank'), '#' => Mage::helper('sublogin')->__('Edit Customer'));
     $_b4b4ae1cce58b916954ba6a30ef73681af8a36c4[] = array('@' => array('href' => $this->getUrl('sublogin/adminhtml_index/edit', array('id' => $_15ded6f30a13ef74e4a6288cd249a3be115e0ad0->getId())), 'target' => '_self'), '#' => Mage::helper('sublogin')->__('Edit Sublogin'));
     $_b4b4ae1cce58b916954ba6a30ef73681af8a36c4[] = array('@' => array('href' => $this->getUrl('sublogin/adminhtml_index/deleteSingleSublogin', array('id' => $_15ded6f30a13ef74e4a6288cd249a3be115e0ad0->getId())), 'target' => '_self'), '#' => Mage::helper('sublogin')->__('Delete Sublogin'));
     return $this->_actionsToHtml($_b4b4ae1cce58b916954ba6a30ef73681af8a36c4);
 }
开发者ID:jronatay,项目名称:ultimo-magento-jron,代码行数:8,代码来源:ActionRenderer.php

示例15: render

 public function render(Varien_Object $row)
 {
     $actions = array();
     if ($row->getId() > 1) {
         $actions[] = array('@' => array('href' => $this->getUrl('*/*/edit', array('id' => $row->getId(), 'store' => Mage::registry('store_id')))), '#' => Mage::helper('downloads')->__('Edit'));
         return $this->_actionsToHtml($actions);
     }
 }
开发者ID:commercekitchen,项目名称:dualeyewear-magento,代码行数:8,代码来源:Action.php


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