src/Utility/Import.php
public static function actionButtons(ResultSetInterface $resultSet, Table $table, array $data) : array
    {
        $view = new View();
        list($plugin, $controller) = pluginSplit($table->getRegistryAlias());

        foreach ($resultSet as $key => $entity) {
            if (!$entity->get('model_id')) {
                $data[$key][] = '';
                continue;
            }

            $url = [
                'prefix' => false,
                'plugin' => $plugin,
                'controller' => $controller,
                'action' => 'view',
                $entity->get('model_id')
            ];
            $link = $view->Html->link('<i class="fa fa-eye"></i>', $url, [
                'title' => __('View'),
                'class' => 'btn btn-default',
                'escape' => false
            ]);

            $html = '<div class="btn-group btn-group-xs" role="group">' . $link . '</div>';

            $data[$key][] = $html;
        }

        return $data;
    }
public static function actionButtons(ResultSetInterface $resultSet, Table $table, array $data) : array
    {
        $view = new View();
        list($plugin, $controller) = pluginSplit($table->getRegistryAlias());

        foreach ($resultSet as $key => $entity) {
            if (!$entity->get('model_id')) {
                $data[$key][] = '';
                continue;
            }

            $url = [
                'prefix' => false,
                'plugin' => $plugin,
                'controller' => $controller,
                'action' => 'view',
                $entity->get('model_id')
            ];
            $link = $view->Html->link('<i class="fa fa-eye"></i>', $url, [
                'title' => __('View'),
                'class' => 'btn btn-default',
                'escape' => false
            ]);

            $html = '<div class="btn-group btn-group-xs" role="group">' . $link . '</div>';

            $data[$key][] = $html;
        }

        return $data;
    }
public static function actionButtons ( ResultSetInterface $ resultSet , Table $ table , array $ data ) : array { $ view = new View ( ) ; list ( $ plugin , $ controller ) = pluginSplit ( $ table -> getRegistryAlias ( ) ) ; foreach ( $ resultSet as $ key => $ entity ) { if ( ! $ entity -> get ( 'model_id' ) ) { $ data [ $ key ] [ ] = '' ; continue ; } $ url = [ 'prefix' => false , 'plugin' => $ plugin , 'controller' => $ controller , 'action' => 'view' , $ entity -> get ( 'model_id' ) ] ; $ link = $ view -> Html -> link ( '<i class="fa fa-eye"></i>' , $ url , [ 'title' => __ ( 'View' ) , 'class' => 'btn btn-default' , 'escape' => false ] ) ; $ html = '<div class="btn-group btn-group-xs" role="group">' . $ link . '</div>' ; $ data [ $ key ] [ ] = $ html ; } return $ data ; }
Add action buttons to response data.

@param \Cake\Datasource\ResultSetInterface $resultSet ResultSet
@param \Cake\ORM\Table $table Table instance
@param mixed[] $data Response data
@return mixed[]
Add action buttons to response data .