You are here

interface DateRecurRuleInterface in Recurring Dates Field 3.0.x

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

Defines an interface for a single rule.

Normalizes rule class implementations.

Hierarchy

Expanded class hierarchy of DateRecurRuleInterface

All classes that implement DateRecurRuleInterface

1 file declares its use of DateRecurRuleInterface
RlDateRecurRule.php in src/Rl/RlDateRecurRule.php

File

src/DateRecurRuleInterface.php, line 12

Namespace

Drupal\date_recur
View source
interface DateRecurRuleInterface {

  /**
   * Get the frequency for the rule.
   *
   * @return string
   *   The frequency for the rule.
   */
  public function getFrequency() : string;

  /**
   * Get the RULE parts.
   *
   * For example, "FREQ=WEEKLY;BYDAY=MO,TU,WE,TH,FR;" will return:
   *
   * @code
   *
   * [
   *   'BYDAY' => 'MO,TU,WE,TH,FR',
   *   'DTSTART' => \DateTime(...),
   *   'FREQ' => 'WEEKLY',
   * ]
   *
   * @endcode
   *
   * @return array
   *   The parts of the RRULE.
   */
  public function getParts() : array;

}

Members

Namesort descending Modifiers Type Description Overrides
DateRecurRuleInterface::getFrequency public function Get the frequency for the rule. 1
DateRecurRuleInterface::getParts public function Get the RULE parts. 1