tarte_au_citron-1.0.0-beta1/src/ServicesManagerInterface.php

src/ServicesManagerInterface.php
<?php

namespace Drupal\tarte_au_citron;

/**
 * Interface for the class that gathers the provider plugins.
 */
interface ServicesManagerInterface {

  /**
   * Get an options list suitable for services selection.
   *
   * @return array
   *   An array of options keyed by plugin ID with label values.
   */
  public function getServicesOptionList(): array;

  /**
   * Get an array of Service Object which are enabled.
   *
   * @param bool $enabled
   *   Only return enabled services.
   *
   * @return \Drupal\tarte_au_citron\ServicePluginBase[]
   *   An array of enabled services.
   */
  public function getServices(bool $enabled = FALSE): array;

  /**
   * Check if a service is enabled.
   *
   * @param string $serviceId
   *   The service key.
   *
   * @return bool
   *   TRUE if service is enabled, FALSE otherwise.
   */
  public function isServiceEnabled(string $serviceId): bool;

  /**
   * Check if tarte au citron is needed.
   *
   * @return bool
   *   TRUE if the service is needed, FALSE otherwise.
   */
  public function isNeeded(): bool;

}

Главная | Обратная связь

drupal hosting | друпал хостинг | it patrol .inc