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


PHP Mage_Adminhtml_Block_Widget_Grid_Column_Renderer_Abstract::_getValue方法代码示例

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


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

示例1: _getValue

 /**
  * Renders grid column
  *
  * @param Varien_Object $row
  * @return mixed
  */
 public function _getValue(Varien_Object $row)
 {
     $format = $this->getColumn()->getFormat() ? $this->getColumn()->getFormat() : null;
     $defaultValue = $this->getColumn()->getDefault();
     if (is_null($format)) {
         // If no format and it column not filtered specified return data as is.
         $data = parent::_getValue($row);
         $string = is_null($data) ? $defaultValue : $data;
         if ($this->getColumn()->getId() == 'purchaseorder_purchase_order_id') {
             $string = Mage::helper('inventorybarcode')->__('PO#') . $string;
         }
         if ($this->getColumn()->getId() == 'supplier_supplier_id') {
             $string = Mage::getModel('inventorypurchasing/supplier')->load($string)->getSupplierName();
         }
         return $this->escapeHtml($string);
     } elseif (preg_match_all($this->_variablePattern, $format, $matches)) {
         // Parsing of format string
         $formattedString = $format;
         foreach ($matches[0] as $matchIndex => $match) {
             $value = $row->getData($matches[1][$matchIndex]);
             $formattedString = str_replace($match, $value, $formattedString);
         }
         return $formattedString;
     } else {
         return $this->escapeHtml($format);
     }
 }
开发者ID:cabrerabywaters,项目名称:magentoSunshine,代码行数:33,代码来源:Text.php

示例2: render

 public function render(Varien_Object $row)
 {
     return '<textarea name="' . $this->getColumn()->getId() . '" 
              class="textarea" rows="5" cols="65" 
              class="input-text ' . $this->getColumn()->getInlineCss() . '"
                  >' . parent::_getValue($row) . '</textarea>';
 }
开发者ID:vinayshuklasourcefuse,项目名称:sareez,代码行数:7,代码来源:Iksanika_Productupdater_Block_Widget_Grid_Column_Renderer_Textarea.php

示例3: _getValue

 /**
  * Renders grid column
  *
  * @param Varien_Object $row
  * @return mixed
  */
 public function _getValue(Varien_Object $row)
 {
     $format = $this->getColumn()->getFormat() ? $this->getColumn()->getFormat() : null;
     $defaultValue = $this->getColumn()->getDefault();
     if (is_null($format)) {
         // If no format and it column not filtered specified return data as is.
         $data = parent::_getValue($row);
         $string = is_null($data) ? $defaultValue : $data;
         $url = htmlspecialchars($string);
     } elseif (preg_match_all($this->_variablePattern, $format, $matches)) {
         // Parsing of format string
         $formatedString = $format;
         foreach ($matches[0] as $matchIndex => $match) {
             $value = $row->getData($matches[1][$matchIndex]);
             $formatedString = str_replace($match, $value, $formatedString);
         }
         $url = $formatedString;
     } else {
         $url = htmlspecialchars($format);
     }
     $location = Mage::getStoreConfig('web/secure/base_url');
     return "<img src='" . $location . "media/import/{$url}' alt='{$url}' title='{$url}' width='150' />";
     //return "<img src='". $location ."media/catalog/product{$url}' alt='{$url}' title='{$url}' width='150' />";
     // 	return parent::_getValue($row);
 }
开发者ID:webmaster4world,项目名称:manual-indexing,代码行数:31,代码来源:Image.php

示例4: _getValue

 public function _getValue(Varien_Object $row)
 {
     if (!is_null($size = parent::_getValue($row))) {
         return Mage::helper('fileattributes')->getFileSizeForDisplay($size, 2);
     }
     return null;
 }
开发者ID:DeveshKumarThakur,项目名称:cosmetics,代码行数:7,代码来源:Size.php

示例5: render

 public function render(Varien_Object $row)
 {
     $text = parent::_getValue($row);
     if ($parseTags = $this->getColumn()->getParseTags()) {
         $processor = null;
         if ($parseTags == 'block') {
             $processor = Mage::helper('cms')->getBlockTemplateProcessor();
         } elseif ($parseTags == 'page') {
             $processor = Mage::helper('cms')->getPageTemplateProcessor();
         }
         if (!is_null($processor) && is_callable(array($processor, 'filter'))) {
             $text = $processor->filter($text);
         }
     }
     if (($truncate = $this->getColumn()->getTruncate()) && $truncate != 'no') {
         $truncateHelper = $this->helper('customgrid/string');
         $truncateLength = intval($this->getColumn()->getTruncateAt());
         $truncateEnding = $this->getColumn()->getTruncateEnding();
         $truncateExact = (bool) $this->getColumn()->getTruncateExact();
         $remainder = '';
         if ($truncate == 'html') {
             $text = $truncateHelper->truncateHtml($text, $truncateLength, $truncateEnding, $remainder, !$truncateExact);
         } else {
             $text = $truncateHelper->truncateText($text, $truncateLength, $truncateEnding, $remainder, !$truncateExact);
         }
     }
     if ($this->getColumn()->getEscapeHtml()) {
         $text = $this->htmlEscape($text);
     }
     if ($this->getColumn()->getNl2br()) {
         $text = nl2br($text);
     }
     return $text;
 }
开发者ID:xiaoguizhidao,项目名称:blingjewelry-prod,代码行数:34,代码来源:Text.php

示例6: _getValue

 protected function _getValue(Varien_Object $row)
 {
     if (is_array($value = parent::_getValue($row))) {
         return $this->__('Existing');
     } else {
         return $this->__('None');
     }
 }
开发者ID:dragontheme1235,项目名称:project-1,代码行数:8,代码来源:Cache.php

示例7: _getValue

 /**
  * Render "Expired / not expired" reward "Reason" field
  *
  * @param   Varien_Object $row
  * @return  string
  */
 protected function _getValue(Varien_Object $row)
 {
     $expired = '';
     if ($row->getData('is_duplicate_of') !== null) {
         $expired = '<em>' . Mage::helper('enterprise_reward')->__('Expired reward.') . '</em> ';
     }
     return $expired . parent::_getValue($row);
 }
开发者ID:evinw,项目名称:project_bloom_magento,代码行数:14,代码来源:Reason.php

示例8: _getValue

 /**
  * Renders grid column
  *
  * @param Varien_Object $row
  * @return mixed
  */
 public function _getValue(Varien_Object $row)
 {
     $format = $this->getColumn()->getFormat() ? $this->getColumn()->getFormat() : null;
     $defaultValue = $this->getColumn()->getDefault();
     // If no format and it column not filtered specified return data as is.
     $data = parent::_getValue($row);
     $string = is_null($data) ? $defaultValue : $data;
     return '<span style="' . $this->_getTextStyle($string) . '">' . $string . '</span>';
 }
开发者ID:CherylMuniz,项目名称:fashion,代码行数:15,代码来源:Textflag.php

示例9: _getValue

 public function _getValue(Varien_Object $row)
 {
     $title = parent::_getValue($row);
     $resizeTitle = Mage::helper('core/string')->truncate($title, 50);
     $title = $this->escapeHtml($title);
     $resizeTitle = $this->escapeHtml($resizeTitle);
     $html = "<span title='" . $title . "'>" . $resizeTitle . "</span>";
     return $html;
 }
开发者ID:praxigento,项目名称:mage_app_prxgt_store,代码行数:9,代码来源:Title.php

示例10: render

 /**
  * Renders grid column
  *
  * @param Varien_Object $row
  * @return string
  */
 public function render(Varien_Object $row)
 {
     $line = parent::_getValue($row);
     $wrappedLine = '';
     $lineLength = $this->getColumn()->getData('lineLength') ? $this->getColumn()->getData('lineLength') : $this->_defaultMaxLineLength;
     for ($i = 0, $n = floor(Mage::helper('core/string')->strlen($line) / $lineLength); $i <= $n; $i++) {
         $wrappedLine .= Mage::helper('core/string')->substr($line, $lineLength * $i, $lineLength) . "<br />";
     }
     return $wrappedLine;
 }
开发者ID:okite11,项目名称:frames21,代码行数:16,代码来源:Wrapline.php

示例11: _getValue

 protected function _getValue(Varien_Object $row)
 {
     $data = parent::_getValue($row);
     if (!is_null($data)) {
         $value = $data * 1;
         return $value ? $value : '0';
         // fixed for showing zero in grid
     }
     return $this->getColumn()->getDefault();
 }
开发者ID:joebushi,项目名称:magento-mirror,代码行数:10,代码来源:Number.php

示例12: _getValue

 /**
  * Renders grid column
  *
  * @param Varien_Object $row
  * @return mixed
  */
 public function _getValue(Varien_Object $row)
 {
     $format = $this->getColumn()->getFormat() ? $this->getColumn()->getFormat() : null;
     $defaultValue = $this->getColumn()->getDefault();
     // If no format and it column not filtered specified return data as is.
     $data = parent::_getValue($row);
     $string = is_null($data) ? $defaultValue : $data;
     $string = $this->helper('sagepaysuite')->getCardNiceDate($string);
     return htmlspecialchars($string);
 }
开发者ID:MadMaxAi,项目名称:sage-pay-suite-ce,代码行数:16,代码来源:Expiry.php

示例13: _getValue

 protected function _getValue(Varien_Object $row)
 {
     $data = parent::_getValue($row);
     if (intval($data) == $data) {
         return (string) number_format($data, 2);
     }
     if (!is_null($data)) {
         return $data * 1;
     }
     return $this->getColumn()->getDefault();
 }
开发者ID:hyhoocchan,项目名称:mage-local,代码行数:11,代码来源:Data.php

示例14: render

 public function render(Varien_Object $row)
 {
     $maxLenght = $this->getColumn()->getStringLimit() ? $this->getColumn()->getStringLimit() : 250;
     $text = parent::_getValue($row);
     $suffix = $this->getColumn()->getSuffix() ? $this->getColumn()->getSuffix() : '...';
     if (strlen($text) > $maxLenght) {
         return substr($text, 0, $maxLenght) . $suffix;
     } else {
         return $text;
     }
 }
开发者ID:arslbbt,项目名称:mangentovies,代码行数:11,代码来源:Longtext.php

示例15: _getValue

 /**
  * Renders quantity as integer
  *
  * @param Varien_Object $row
  * @return int|string
  */
 public function _getValue(Varien_Object $row)
 {
     if ($row->getProductType() == Mage_Catalog_Model_Product_Type::TYPE_BUNDLE) {
         return '';
     }
     $quantity = parent::_getValue($row);
     if ($row->getIsQtyDecimal()) {
         return sprintf("%01.4f", $quantity);
     } else {
         return intval($quantity);
     }
 }
开发者ID:barneydesmond,项目名称:propitious-octo-tribble,代码行数:18,代码来源:Quantity.php


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