function UpdateManagerUpdate::removeCheckboxFromRow
Same name in other branches
- 9 core/modules/update/src/Form/UpdateManagerUpdate.php \Drupal\update\Form\UpdateManagerUpdate::removeCheckboxFromRow()
- 10 core/modules/update/src/Form/UpdateManagerUpdate.php \Drupal\update\Form\UpdateManagerUpdate::removeCheckboxFromRow()
- 11.x core/modules/update/src/Form/UpdateManagerUpdate.php \Drupal\update\Form\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 337
Class
- UpdateManagerUpdate
- Configure update settings for this site.
Namespace
Drupal\update\FormCode
protected function removeCheckboxFromRow(array &$row) {
unset($row['#weight']);
$attributes = $row['#attributes'];
unset($row['#attributes']);
$row = [
'data' => $row,
] + $attributes;
}
Buggy or inaccurate documentation? Please file an issue. Need support? Need help programming? Connect with the Drupal community.