You are here

public function UpdateChecklist::markAllUpdates in Update helper 8

Same name and namespace in other branches
  1. 2.x modules/update_helper_checklist/src/UpdateChecklist.php \Drupal\update_helper_checklist\UpdateChecklist::markAllUpdates()

Marks a list of updates.

Parameters

bool $status: Checkboxes enabled or disabled.

Throws

\Drupal\Core\Entity\EntityStorageException

File

modules/update_helper_checklist/src/UpdateChecklist.php, line 127

Class

UpdateChecklist
Update checklist service.

Namespace

Drupal\update_helper_checklist

Code

public function markAllUpdates($status = TRUE) {
  $update_ids = [];
  foreach ($this
    ->getChecklist()->items as $version_items) {
    foreach ($version_items as $key => $item) {
      if (is_array($item)) {
        $update_ids[] = $key;
      }
    }
  }
  $this
    ->setSuccessfulByHook($update_ids, $status);
  $this
    ->checkAllListPoints($status);
}