<?php

namespace FiloBlu\Rma\Block\Adminhtml\Order\View\Tab\ChangeSizeOrders\Renderer;

use Magento\Framework\DataObject;
use Magento\Backend\Block\Widget\Grid\Column\Renderer\AbstractRenderer;

/**
 *
 */
class Link extends AbstractRenderer
{
    /**
     * Renders grid column
     *
     * @param DataObject $row
     * @return string
     */
    public function render(DataObject $row)
    {
        // Assuming 'entity_id' is the primary key
        $id = $row->getData('child_order_id');
        $url = $this->getUrl('sales/order/view', ['order_id' => $id]);

        return '<a href="' . $url . '" target="_blank">' . __('View') . '</a>';
    }
}
