Commit 9a1f7299 authored by Tim Rohaly's avatar Tim Rohaly
Browse files

Issue #3126182 by TR: Coding standards

parent e002b6de
Loading
Loading
Loading
Loading
+5 −5
Changes for src/Plugin/views/style/Table.php: 5 added lines, 5 removed lines.
Original line number Diff line number Diff line
@@ -4,6 +4,7 @@ namespace Drupal\views_aggregator\Plugin\views\style;

use Drupal\Core\Form\FormStateInterface;
use Drupal\Component\Utility\Xss;
use Drupal\system\Plugin\views\field\BulkForm;
use Drupal\views\Plugin\views\style\Table as ViewsTable;
use Drupal\views\ResultRow;
use Drupal\views\Render\ViewsRenderPipelineMarkup;
@@ -84,7 +85,9 @@ class Table extends ViewsTable {
    unset($form['grouping']);

    $form['description_markup'] = [
      '#markup' => '<div class="description form-item">' . $this->t('Column aggregation functions may be enabled independently of group aggregation functions. Every group aggregation function, except <em>Filter rows (by regexp)</em>, requires exactly <strong>one</strong> field to be assigned the <em>Group and compress</em> function. With that done, select any of the other aggregation functions for some or all of the fields. Functions marked with an asterisk take an optional parameter. For the aggregation functions <em>Enumerate, Range</em> and <em>Tally</em> the optional parameter is a delimiter to separate items. <br/>If you rewrite the results of a field, the aggregation functions will still use the original value. You can use a Global:Custom text field and Twig syntax instead to rewrite the results and apply aggregation functions on it. The Twig number_format() filter can be applied as last filter, its settings for decimal and thousand separator will be respected by the aggregation functions.<br/>You may combine multiple fields into the same render column. If you do, the separator specified will be used to separate the fields. You can control column order and field labels in the Fields section of the main configuration page.') . '</div>',
      '#prefix' => '<div class="description form-item">',
      '#markup' => $this->t('Column aggregation functions may be enabled independently of group aggregation functions. Every group aggregation function, except <em>Filter rows (by regexp)</em>, requires exactly <strong>one</strong> field to be assigned the <em>Group and compress</em> function. With that done, select any of the other aggregation functions for some or all of the fields. Functions marked with an asterisk take an optional parameter. For the aggregation functions <em>Enumerate, Range</em> and <em>Tally</em> the optional parameter is a delimiter to separate items. <br/>If you rewrite the results of a field, the aggregation functions will still use the original value. You can use a Global:Custom text field and Twig syntax instead to rewrite the results and apply aggregation functions on it. The Twig number_format() filter can be applied as last filter, its settings for decimal and thousand separator will be respected by the aggregation functions.<br/>You may combine multiple fields into the same render column. If you do, the separator specified will be used to separate the fields. You can control column order and field labels in the Fields section of the main configuration page.'),
      '#suffix' => '</div>',
    ];

    foreach ($columns as $field => $column) {
@@ -308,9 +311,6 @@ class Table extends ViewsTable {
   * This function applies to the currently visible page only. If paging is
   * enabled for this display view->result may only contain part of the entire
   * result set.
   *
   * @param array $results
   *   The results returned from the database query.
   */
  public function preRender($results) {
    if (isset($this->view->is_temp_views_aggregator)) {
@@ -543,7 +543,7 @@ class Table extends ViewsTable {
    $field_handlers = $this->view->field;
    $moduleHandler = \Drupal::service('module_handler');
    foreach ($field_handlers as $field_name => $handler) {
      if ($handler instanceof \Drupal\system\Plugin\views\field\BulkForm ||
      if ($handler instanceof BulkForm ||
        ($moduleHandler->moduleExists('views_bulk_operations') && is_a($handler,
            '\\Drupal\\views_bulk_operations\\Plugin\\views\\field\\ViewsBulkOperationsBulkForm'))) {
        foreach ($this->rendered_fields as $num => $row) {