Public Member Functions | |
render (Varien_Object $row) | |
Protected Member Functions | |
_getFormat () | |
Static Protected Attributes | |
static | $_format = null |
Definition at line 35 of file Datetime.php.
_getFormat | ( | ) | [protected] |
Retrieve datetime format
Definition at line 47 of file Datetime.php.
00048 { 00049 $format = $this->getColumn()->getFormat(); 00050 if (!$format) { 00051 if (is_null(self::$_format)) { 00052 try { 00053 self::$_format = Mage::app()->getLocale()->getDateTimeFormat( 00054 Mage_Core_Model_Locale::FORMAT_TYPE_MEDIUM 00055 ); 00056 } 00057 catch (Exception $e) { 00058 00059 } 00060 } 00061 $format = self::$_format; 00062 } 00063 return $format; 00064 }
render | ( | Varien_Object $ | row | ) |
Renders grid column
Varien_Object | $row |
Reimplemented from Mage_Adminhtml_Block_Widget_Grid_Column_Renderer_Abstract.
Definition at line 72 of file Datetime.php.
00073 { 00074 if ($data = $row->getData($this->getColumn()->getIndex())) { 00075 $format = $this->_getFormat(); 00076 try { 00077 $data = Mage::app()->getLocale()->date($data, Varien_Date::DATETIME_INTERNAL_FORMAT)->toString($format); 00078 } 00079 catch (Exception $e) 00080 { 00081 $data = Mage::app()->getLocale()->date($data, Varien_Date::DATETIME_INTERNAL_FORMAT)->toString($format); 00082 } 00083 return $data; 00084 00085 } 00086 return $this->getColumn()->getDefault(); 00087 }
$_format = null [static, protected] |
Date format string
Definition at line 40 of file Datetime.php.