You are here

public function UpdateRunnerUtils::updateSupportsTypes in Scheduled Updates 8

Parameters

\Drupal\scheduled_updates\ScheduledUpdateTypeInterface $scheduledUpdateType:

$types:

Return value

bool

2 calls to UpdateRunnerUtils::updateSupportsTypes()
UpdateRunnerUtils::isEmbeddedUpdater in src/UpdateRunnerUtils.php
UpdateRunnerUtils::isIndependentUpdater in src/UpdateRunnerUtils.php

File

src/UpdateRunnerUtils.php, line 205
Contains \Drupal\scheduled_updates\UpdateRunnerUtils.

Class

UpdateRunnerUtils
A service that runs all available updaters

Namespace

Drupal\scheduled_updates

Code

public function updateSupportsTypes(ScheduledUpdateTypeInterface $scheduledUpdateType, $types) {
  $plugin_id = $scheduledUpdateType
    ->getUpdateRunnerSettings()['id'];
  if ($this->runnerManager
    ->hasDefinition($plugin_id)) {
    $definition = $this->runnerManager
      ->getDefinition($plugin_id);
    $unsupported_types = array_diff($types, $definition['update_types']);
    return empty($unsupported_types);
  }
  return FALSE;
}