Bootstrap->table([ 'hover' => false, ], [ 'fields' => [ ['path' => 'label', 'label' => __('Label')], ['path' => 'name', 'label' => __('Name')], ['path' => 'url', 'label' => __('URL'), 'formatter' => function ($value, $row) { return sprintf('%s', h($value)); }], ['path' => 'action', 'label' => __('Action'), 'formatter' => function ($value, $row, $index) { return $this->Bootstrap->button([ 'icon' => 'trash', 'variant' => 'danger', 'size' => 'sm', 'onclick' => sprintf('deleteBookmark(window.bookmarks[%s])', $index), ]); }], ], 'items' => $bookmarks, 'caption' => empty($bookmarks) ? __('No bookmark saved') : '' ]); ?>