_urlHelper = $urlHelper;
parent::__construct($context, $data);
}
/**
* Renders grid column
*
* @param \Magento\Framework\DataObject $row
* @return string
*/
public function render(\Magento\Framework\DataObject $row)
{
$readDetailsHtml = $row->getUrl() ? '' .
__('Read Details') . '' : '';
$markAsReadHtml = !$row->getIsRead() ? '' . __(
'Mark as Read'
) . '' : '';
$encodedUrl = $this->_urlHelper->getEncodedUrl();
return sprintf(
'%s%s%s',
$readDetailsHtml,
$markAsReadHtml,
$this->getUrl(
'*/*/remove/',
[
'_current' => true,
'id' => $row->getId(),
\Magento\Framework\App\ActionInterface::PARAM_NAME_URL_ENCODED => $encodedUrl
]
),
__('Are you sure?'),
__('Remove')
);
}
}