You are here

class AutomaticCropProviders in Crop API 8.2

Collects "Automatic crop" providers.

Hierarchy

Expanded class hierarchy of AutomaticCropProviders

1 file declares its use of AutomaticCropProviders
CropEffect.php in src/Plugin/ImageEffect/CropEffect.php

File

src/Events/AutomaticCropProviders.php, line 10

Namespace

Drupal\crop\Events
View source
class AutomaticCropProviders extends Event {

  /**
   * Automatic Crop provider list.
   *
   * @var array
   */
  protected $providers = [];

  /**
   * Adds provider.
   *
   * @param array $provider
   *   Register provider to providers list.
   */
  public function registerProvider(array $provider) {
    $this->providers[key($provider)] = current($provider);
  }

  /**
   * Sets automatic crop providers.
   *
   * @param array $providers
   *   List of automatic crop providers.
   */
  public function setProviders(array $providers) {
    $this->providers = $providers;
  }

  /**
   * Gets automatic crop providers.
   *
   * @return array
   *   List of providers.
   */
  public function getProviders() {
    return $this->providers;
  }

}

Members

Namesort descending Modifiers Type Description Overrides
AutomaticCropProviders::$providers protected property Automatic Crop provider list.
AutomaticCropProviders::getProviders public function Gets automatic crop providers.
AutomaticCropProviders::registerProvider public function Adds provider.
AutomaticCropProviders::setProviders public function Sets automatic crop providers.