Public Member Functions | |
setColumn ($column) | |
getColumn () | |
render (Varien_Object $row) | |
renderExport (Varien_Object $row) | |
_getInputValueElement (Varien_Object $row) | |
renderHeader () | |
renderProperty () | |
renderCss () | |
Protected Member Functions | |
_getValue (Varien_Object $row) | |
_getInputValue (Varien_Object $row) | |
Protected Attributes | |
$_defaultWidth | |
$_column |
Definition at line 35 of file Abstract.php.
_getInputValue | ( | Varien_Object $ | row | ) | [protected] |
_getInputValueElement | ( | Varien_Object $ | row | ) |
Definition at line 87 of file Abstract.php.
00088 { 00089 return '<input type="text" class="input-text ' . $this->getColumn()->getValidateClass() . '" name="'.( $this->getColumn()->getName() ? $this->getColumn()->getName() : $this->getColumn()->getId() ).'" value="'.$this->_getInputValue($row).'"/>'; 00090 }
_getValue | ( | Varien_Object $ | row | ) | [protected] |
Reimplemented in Mage_Adminhtml_Block_Report_Grid_Column_Renderer_Blanknumber, Mage_Adminhtml_Block_Tax_Rate_Grid_Renderer_Data, Mage_Adminhtml_Block_Widget_Grid_Column_Renderer_Number, and Mage_Adminhtml_Block_Widget_Grid_Column_Renderer_Text.
Definition at line 79 of file Abstract.php.
00080 { 00081 if ($getter = $this->getColumn()->getGetter()) { 00082 return $row->$getter(); 00083 } 00084 return $row->getData($this->getColumn()->getIndex()); 00085 }
getColumn | ( | ) |
Implements Mage_Adminhtml_Block_Widget_Grid_Column_Renderer_Interface.
Definition at line 46 of file Abstract.php.
render | ( | Varien_Object $ | row | ) |
Renders grid column
Varien_Object | $row |
Implements Mage_Adminhtml_Block_Widget_Grid_Column_Renderer_Interface.
Reimplemented in Mage_Adminhtml_Block_Backup_Grid_Renderer_Type, Mage_Adminhtml_Block_Catalog_Product_Edit_Tab_Super_Config_Grid_Renderer_Checkbox, Mage_Adminhtml_Block_Catalog_Product_Edit_Tab_Super_Config_Grid_Renderer_Inventory, Mage_Adminhtml_Block_Cms_Page_Grid_Renderer_Action, Mage_Adminhtml_Block_Customer_Edit_Tab_Newsletter_Grid_Renderer_Action, Mage_Adminhtml_Block_Customer_Edit_Tab_Newsletter_Grid_Renderer_Status, Mage_Adminhtml_Block_Customer_Edit_Tab_Wishlist_Grid_Renderer_Description, Mage_Adminhtml_Block_Customer_Online_Grid_Renderer_Ip, Mage_Adminhtml_Block_Customer_Online_Grid_Renderer_Type, Mage_Adminhtml_Block_Customer_Online_Grid_Renderer_Url, Mage_Adminhtml_Block_Dashboard_Searches_Renderer_Searchquery, Mage_Adminhtml_Block_Extensions_Local_Grid_Renderer_Action, Mage_Adminhtml_Block_Extensions_Remote_Grid_Renderer_Action, Mage_Adminhtml_Block_Newsletter_Problem_Grid_Renderer_Checkbox, Mage_Adminhtml_Block_Newsletter_Queue_Grid_Renderer_Action, Mage_Adminhtml_Block_Newsletter_Subscriber_Grid_Renderer_Checkbox, Mage_Adminhtml_Block_Newsletter_Template_Grid_Renderer_Action, Mage_Adminhtml_Block_Newsletter_Template_Grid_Renderer_Sender, Mage_Adminhtml_Block_Notification_Grid_Renderer_Actions, Mage_Adminhtml_Block_Notification_Grid_Renderer_Notice, Mage_Adminhtml_Block_Notification_Grid_Renderer_Severity, Mage_Adminhtml_Block_Report_Grid_Column_Renderer_Currency, Mage_Adminhtml_Block_Report_Grid_Column_Renderer_Customer, Mage_Adminhtml_Block_Report_Grid_Column_Renderer_Product, Mage_Adminhtml_Block_Report_Product_Downloads_Renderer_Purchases, Mage_Adminhtml_Block_Review_Grid_Renderer_Type, Mage_Adminhtml_Block_Sales_Order_Create_Search_Grid_Renderer_Giftmessage, Mage_Adminhtml_Block_Sales_Reorder_Renderer_Action, Mage_Adminhtml_Block_Sitemap_Grid_Renderer_Action, Mage_Adminhtml_Block_Sitemap_Grid_Renderer_Link, Mage_Adminhtml_Block_Sitemap_Grid_Renderer_Time, Mage_Adminhtml_Block_System_Convert_Profile_Edit_Renderer_Action, Mage_Adminhtml_Block_System_Email_Template_Grid_Renderer_Action, Mage_Adminhtml_Block_System_Email_Template_Grid_Renderer_Sender, Mage_Adminhtml_Block_System_Email_Template_Grid_Renderer_Type, Mage_Adminhtml_Block_System_Store_Grid_Render_Group, Mage_Adminhtml_Block_System_Store_Grid_Render_Store, Mage_Adminhtml_Block_System_Store_Grid_Render_Website, Mage_Adminhtml_Block_Widget_Grid_Column_Renderer_Action, Mage_Adminhtml_Block_Widget_Grid_Column_Renderer_Checkbox, Mage_Adminhtml_Block_Widget_Grid_Column_Renderer_Concat, Mage_Adminhtml_Block_Widget_Grid_Column_Renderer_Country, Mage_Adminhtml_Block_Widget_Grid_Column_Renderer_Currency, Mage_Adminhtml_Block_Widget_Grid_Column_Renderer_Date, Mage_Adminhtml_Block_Widget_Grid_Column_Renderer_Datetime, Mage_Adminhtml_Block_Widget_Grid_Column_Renderer_Input, Mage_Adminhtml_Block_Widget_Grid_Column_Renderer_Longtext, Mage_Adminhtml_Block_Widget_Grid_Column_Renderer_Massaction, Mage_Adminhtml_Block_Widget_Grid_Column_Renderer_Options, Mage_Adminhtml_Block_Widget_Grid_Column_Renderer_Price, Mage_Adminhtml_Block_Widget_Grid_Column_Renderer_Radio, Mage_Adminhtml_Block_Widget_Grid_Column_Renderer_Select, Mage_Adminhtml_Block_Widget_Grid_Column_Renderer_Store, Mage_Adminhtml_Block_Widget_Grid_Column_Renderer_Wrapline, Mage_GoogleBase_Block_Adminhtml_Items_Renderer_Id, and Mage_GoogleBase_Block_Adminhtml_Types_Renderer_Country.
Definition at line 57 of file Abstract.php.
00058 { 00059 if ($this->getColumn()->getEditable()) { 00060 $value = $this->_getValue($row); 00061 $value = $value!=''?$value:' '; 00062 return $value . ( ($this->getColumn()->getEditOnly() && trim($this->_getValue($row)!='')) ? '' : '</td><td>' ) . $this->_getInputValueElement($row); 00063 00064 } 00065 return $this->_getValue($row); 00066 }
renderCss | ( | ) |
Reimplemented in Mage_Adminhtml_Block_Widget_Grid_Column_Renderer_Currency, Mage_Adminhtml_Block_Widget_Grid_Column_Renderer_Number, and Mage_Adminhtml_Block_Widget_Grid_Column_Renderer_Price.
Definition at line 146 of file Abstract.php.
00147 { 00148 return $this->getColumn()->getCssClass(); 00149 }
renderExport | ( | Varien_Object $ | row | ) |
Render column for export
Varien_Object | $row |
Reimplemented in Mage_Adminhtml_Block_Tax_Rate_Grid_Renderer_Country.
Definition at line 74 of file Abstract.php.
renderHeader | ( | ) |
Reimplemented in Mage_Adminhtml_Block_Widget_Grid_Column_Renderer_Checkbox, and Mage_Adminhtml_Block_Widget_Grid_Column_Renderer_Massaction.
Definition at line 97 of file Abstract.php.
00098 { 00099 $out = ''; 00100 if ( (false !== $this->getColumn()->getGrid()->getSortable()) && (false !== $this->getColumn()->getSortable()) ) { 00101 00102 $className = 'not-sort'; 00103 $dir = strtolower($this->getColumn()->getDir()); 00104 $nDir= ($dir=='asc') ? 'desc' : 'asc'; 00105 if ($this->getColumn()->getDir()) { 00106 $className = 'sort-arrow-' . $dir; 00107 } 00108 $out = '<a href="#" name="'.$this->getColumn()->getId().'" title="'.$nDir 00109 .'" class="' . $className . '"><span class="sort-title">'.$this->getColumn()->getHeader().'</span></a>'; 00110 } 00111 else { 00112 $out = $this->getColumn()->getHeader(); 00113 } 00114 return $out; 00115 }
renderProperty | ( | ) |
Now we generate 2 "col" definition instead span=2
Reimplemented in Mage_Adminhtml_Block_Widget_Grid_Column_Renderer_Massaction.
Definition at line 117 of file Abstract.php.
00118 { 00119 $out = ''; 00120 /** 00121 * Now we generate 2 "col" definition instead span=2 00122 */ 00123 // if ($this->getColumn()->getEditable() && !$this->getColumn()->getEditOnly()) { 00124 // $out .= ' span="2"'; 00125 // } 00126 00127 $width = $this->_defaultWidth; 00128 00129 if ($this->getColumn()->hasData('width')) { 00130 $customWidth = $this->getColumn()->getData('width'); 00131 if ((null === $customWidth) || (preg_match('/^[0-9]+%?$/', $customWidth))) { 00132 $width = $customWidth; 00133 } 00134 elseif (preg_match('/^([0-9]+)px$/', $customWidth, $matches)) { 00135 $width = (int)$matches[1]; 00136 } 00137 } 00138 00139 if (null !== $width) { 00140 $out .= ' width="' . $width . '"'; 00141 } 00142 00143 return $out; 00144 }
setColumn | ( | $ | column | ) |
Implements Mage_Adminhtml_Block_Widget_Grid_Column_Renderer_Interface.
Definition at line 40 of file Abstract.php.
$_column [protected] |
Definition at line 38 of file Abstract.php.
$_defaultWidth [protected] |
Reimplemented in Mage_Adminhtml_Block_Widget_Grid_Column_Renderer_Checkbox, Mage_Adminhtml_Block_Widget_Grid_Column_Renderer_Currency, Mage_Adminhtml_Block_Widget_Grid_Column_Renderer_Date, Mage_Adminhtml_Block_Widget_Grid_Column_Renderer_Massaction, Mage_Adminhtml_Block_Widget_Grid_Column_Renderer_Number, Mage_Adminhtml_Block_Widget_Grid_Column_Renderer_Price, and Mage_Adminhtml_Block_Widget_Grid_Column_Renderer_Radio.
Definition at line 37 of file Abstract.php.