You are here

private function AutomatedCrop::applies in Automated Crop 8

Determines if the subscriber applies to a specific conditions.

Parameters

string $provider_name: The machine name of automatic crop provider.

Return value

bool True if this subscriber can generate crop.

1 call to AutomatedCrop::applies()
AutomatedCrop::generateAutomatedCrop in modules/automated_crop_crop_provider/src/EventSubscriber/AutomatedCrop.php
Run the generation of crop.

File

modules/automated_crop_crop_provider/src/EventSubscriber/AutomatedCrop.php, line 89

Class

AutomatedCrop
A subscriber running automated crop after a crop is needed.

Namespace

Drupal\automated_crop_crop_provider\EventSubscriber

Code

private function applies($provider_name) {
  return in_array($provider_name, array_keys(\Drupal::service('plugin.manager.automated_crop')
    ->getProviderOptionsList()));
}