Table.php in Open Social 8.4
File
themes/socialbase/src/Plugin/Preprocess/Table.php
View source
<?php
namespace Drupal\socialbase\Plugin\Preprocess;
use Drupal\bootstrap\Plugin\Preprocess\Table as BaseTable;
use Drupal\bootstrap\Utility\Variables;
class Table extends BaseTable {
public function preprocessVariables(Variables $variables) {
if (isset($variables['attributes']['id']) && strpos($variables['attributes']['id'], 'edit-field-files') !== FALSE) {
$variables['attributes']['class'][] = 'tablesaw';
$variables['attributes']['data-tablesaw-mode'] = 'stack';
}
parent::preprocessVariables($variables);
}
}
Classes
Name |
Description |
Table |
Pre-processes variables for the "table" theme hook. |