UIkitViews.php in UIkit Components 8.2
File
uikit_views/src/UIkitViews.php
View source
<?php
namespace Drupal\uikit_views;
use Drupal\Component\Utility\Html;
use Drupal\views\ViewExecutable;
class UIkitViews {
public static function getThemeHooks() {
$hooks['uikit_view_accordion'] = [
'preprocess functions' => [
'template_preprocess_uikit_view_accordion',
],
'file' => 'includes/uikit_views.theme.inc',
];
$hooks['uikit_view_grid'] = [
'preprocess functions' => [
'template_preprocess_uikit_view_grid',
],
'file' => 'includes/uikit_views.theme.inc',
];
$hooks['uikit_view_list'] = [
'preprocess functions' => [
'template_preprocess_uikit_view_list',
],
'file' => 'includes/uikit_views.theme.inc',
];
$hooks['uikit_view_table'] = [
'preprocess functions' => [
'template_preprocess_views_view_table',
'template_preprocess_uikit_view_table',
],
'file' => 'includes/uikit_views.theme.inc',
];
return $hooks;
}
public static function getUniqueId(ViewExecutable $view) {
$id = $view->storage
->id() . '-' . $view->current_display;
return Html::getUniqueId('views-uikit-' . $id);
}
}