You are here

interface DateRecurInterpreterPluginInterface in Recurring Dates Field 3.x

Same name and namespace in other branches
  1. 8.2 src/Plugin/DateRecurInterpreterPluginInterface.php \Drupal\date_recur\Plugin\DateRecurInterpreterPluginInterface
  2. 3.0.x src/Plugin/DateRecurInterpreterPluginInterface.php \Drupal\date_recur\Plugin\DateRecurInterpreterPluginInterface
  3. 3.1.x src/Plugin/DateRecurInterpreterPluginInterface.php \Drupal\date_recur\Plugin\DateRecurInterpreterPluginInterface

Interface for date recur interpreter plugins.

Hierarchy

Expanded class hierarchy of DateRecurInterpreterPluginInterface

All classes that implement DateRecurInterpreterPluginInterface

2 files declare their use of DateRecurInterpreterPluginInterface
DateRecurInterpreter.php in src/Entity/DateRecurInterpreter.php
DateRecurInterpreterInterface.php in src/Entity/DateRecurInterpreterInterface.php

File

src/Plugin/DateRecurInterpreterPluginInterface.php, line 14

Namespace

Drupal\date_recur\Plugin
View source
interface DateRecurInterpreterPluginInterface extends ConfigurableInterface, DependentPluginInterface, PluginWithFormsInterface {

  /**
   * Interpret a set of rules in a language.
   *
   * @param \Drupal\date_recur\DateRecurRuleInterface[] $rules
   *   The rules.
   * @param string $language
   *   The two-letter language code.
   * @param \DateTimeZone|null $timeZone
   *   Time zone to display dates in. Time zone from rules is not used because
   *   time zone used to calculate recurring dates may be different. Use null
   *   for default PHP time zone.
   *
   * @return string
   *   Rules interpreted into a string.
   */
  public function interpret(array $rules, string $language, ?\DateTimeZone $timeZone = NULL) : string;

  /**
   * The languages supported by this plugin.
   *
   * Two letter langcodes. E.g: 'en', 'fr', etc.
   *
   * @return string[]
   *   Supported languages.
   */
  public function supportedLanguages() : array;

}

Members

Namesort descending Modifiers Type Description Overrides
ConfigurableInterface::defaultConfiguration public function Gets default configuration for this plugin. 14
ConfigurableInterface::getConfiguration public function Gets this plugin's configuration. 15
ConfigurableInterface::setConfiguration public function Sets the configuration for this plugin instance. 15
DateRecurInterpreterPluginInterface::interpret public function Interpret a set of rules in a language. 2
DateRecurInterpreterPluginInterface::supportedLanguages public function The languages supported by this plugin. 2
DependentPluginInterface::calculateDependencies public function Calculates dependencies for the configured plugin. 20
PluginInspectionInterface::getPluginDefinition public function Gets the definition of the plugin implementation. 4
PluginInspectionInterface::getPluginId public function Gets the plugin_id of the plugin instance. 2
PluginWithFormsInterface::getFormClass public function Gets the form class for the given operation.
PluginWithFormsInterface::hasFormClass public function Gets whether the plugin has a form class for the given operation.