/** * render cell template * * @param string $columnName * @return string */ protected function _renderCellTemplate($columnName) { $inputName = $this->getElement()->getName() . '[#{_id}][' . $columnName . ']'; if ($columnName == "attribute") { return $this->_getAttributeRenderer()->setName($inputName)->setTitle($columnName)->setExtraParams('style="width:160px"')->setOptions($this->getElement()->getValues())->toHtml(); } elseif ($columnName == "conditions") { return $this->_getConditionsRenderer()->setName($inputName)->setTitle($columnName)->setExtraParams('style="width:160px"')->setOptions($this->_objectManager->create('Dotdigitalgroup\\Email\\Model\\Adminhtml\\Source\\Rules\\Condition')->toOptionArray())->toHtml(); } elseif ($columnName == "cvalue") { return $this->_getValueRenderer()->setName($inputName)->setTitle($columnName)->setExtraParams('style="width:160px"')->setOptions($this->_objectManager->create('Dotdigitalgroup\\Email\\Model\\Adminhtml\\Source\\Rules\\Value')->toOptionArray())->toHtml(); } return parent::renderCellTemplate($columnName); }