Smile\ElasticsuiteThesaurus\Block\Adminhtml\Thesaurus\Renderer\AbstractRenderer::renderCellTemplate PHP Method

renderCellTemplate() public method

Render array cell for JS template
public renderCellTemplate ( string $columnName ) : string
$columnName string The column name
return string
    public function renderCellTemplate($columnName)
    {
        if ($columnName == 'term_id' && isset($this->_columns[$columnName])) {
            $element = $this->elementFactory->create('hidden');
            $element->setId("term_id")->setName("term_id");
            $element->setForm($this->getForm())->setName($this->_getCellInputElementName($columnName))->setHtmlId($this->_getCellInputElementId('<%- _id %>', $columnName));
            return $element->getElementHtml();
        }
        if ($columnName == 'values' && isset($this->_columns[$columnName])) {
            $element = $this->elementFactory->create('textarea');
            $element->setCols($this->textAreaColsNumber)->setForm($this->getForm())->setName($this->_getCellInputElementName($columnName))->setHtmlId($this->_getCellInputElementId('<%- _id %>', $columnName));
            return str_replace("\n", '', $element->getElementHtml());
        }
        return parent::renderCellTemplate($columnName);
    }