Course Content

Expand All

Grids Renderer Link Example

In this example we want to configure the Title column, in a grid of the Service module, to contain a link to open the operation in another tab.

To configure this behavior we must insert in the Renderer scripting area of the Title column the following code:

//retrieve the title of the operation
$value = $this->escapeHtml($row->getTitle());
//I define the url to insert in the link
$url = Deep::getUrl("*/service_operation/edit", ["id" => $row->getId()]);
//the string with the html code is returned to generate the link
return "<div style='width: 300px; font-weight: bold'><a href='$url' target='_blank'>$value</a></div>";