Skip to main content
Drupal API
User account menu
  • Log in

Breadcrumb

  1. Drupal Core 11.1.x
  2. UpdateManagerUpdate.php

function UpdateManagerUpdate::removeCheckboxFromRow

Prepares a row entry for use in a regular table, not a 'tableselect'.

There are no checkboxes in the 'Manual updates' or 'Not compatible' tables, so they will be rendered by '#theme' => 'table', not 'tableselect'. Since the data formats are incompatible, this method converts to the format expected by '#theme' => 'table'. Generally, rows end up in the main tables that have a checkbox to allow the site admin to select which missing updates to install. This method is only used for the special case tables that have no such checkbox.

@todo In https://www.drupal.org/project/drupal/issues/3121775 refactor self::buildForm() so that we don't need this method at all.

Parameters

array[] $row: The render array for a table row.

1 call to UpdateManagerUpdate::removeCheckboxFromRow()
UpdateManagerUpdate::buildForm in core/modules/update/src/Form/UpdateManagerUpdate.php
Form constructor.

File

core/modules/update/src/Form/UpdateManagerUpdate.php, line 346

Class

UpdateManagerUpdate
Configure update settings for this site.

Namespace

Drupal\update\Form

Code

protected function removeCheckboxFromRow(array &$row) {
    unset($row['#weight']);
    $attributes = $row['#attributes'];
    unset($row['#attributes']);
    $row = [
        'data' => $row,
    ] + $attributes;
}

API Navigation

  • Drupal Core 11.1.x
  • Topics
  • Classes
  • Functions
  • Constants
  • Globals
  • Files
  • Namespaces
  • Deprecated
  • Services
RSS feed
Powered by Drupal