/**
  * @param Mana_Db_Model_Entity $row
  * @param Mana_Admin_Block_Grid_Column $column
  * @return array
  */
 public function getCellClientSideBlock($row, $column)
 {
     /* @var $core Mana_Core_Helper_Data */
     $core = Mage::helper('mana_core');
     $standardPrefix = 'adminhtml/widget_grid_column_renderer_';
     $editablePrefix = 'mana_admin/v2_grid_column_';
     $rendererClass = $column->getData('renderer');
     if (!$rendererClass) {
         $rendererClass = $column->getRendererClass();
     }
     $type = 'Mana/Admin/Grid/Cell';
     if ($core->startsWith($rendererClass, $standardPrefix)) {
         $type .= '/' . ucfirst(substr($rendererClass, strlen($standardPrefix)));
     } elseif ($core->startsWith($rendererClass, $editablePrefix)) {
         $type .= '/' . ucfirst(substr($rendererClass, strlen($editablePrefix)));
     }
     return compact('type');
 }
示例#2
0
 /**
  * @param string $columnId
  * @param Mana_Admin_Block_Grid_Column $column
  * @return Mana_Admin_Block_Grid
  */
 public function addColumnBlock($columnId, $column)
 {
     $column->setGrid($this)->setId($columnId)->setData('index', $columnId);
     $this->_columns[$columnId] = $column;
     $this->_lastColumnId = $columnId;
     return $this;
 }