Public Member Functions | |
getValues () | |
render (Varien_Object $row) | |
Protected Attributes | |
$_defaultWidth = 55 | |
$_values |
Definition at line 34 of file Radio.php.
getValues | ( | ) |
render | ( | Varien_Object $ | row | ) |
Renders grid column
Varien_Object | $row |
Reimplemented from Mage_Adminhtml_Block_Widget_Grid_Column_Renderer_Abstract.
Definition at line 52 of file Radio.php.
00053 { 00054 $values = $this->getColumn()->getValues(); 00055 $value = $row->getData($this->getColumn()->getIndex()); 00056 if (is_array($values)) { 00057 $checked = in_array($value, $values) ? ' checked="checked"' : ''; 00058 } 00059 else { 00060 $checked = ($value === $this->getColumn()->getValue()) ? ' checked="checked"' : ''; 00061 } 00062 return '<input type="radio" name="'.$this->getColumn()->getHtmlName().'" value="' . $row->getId() . '" class="radio"'.$checked.'/>'; 00063 }
$_defaultWidth = 55 [protected] |
Reimplemented from Mage_Adminhtml_Block_Widget_Grid_Column_Renderer_Abstract.