public function DateRecurPartGrid::allowParts in Recurring Dates Field 8.2
Same name and namespace in other branches
- 3.x src/DateRecurPartGrid.php \Drupal\date_recur\DateRecurPartGrid::allowParts()
- 3.0.x src/DateRecurPartGrid.php \Drupal\date_recur\DateRecurPartGrid::allowParts()
- 3.1.x src/DateRecurPartGrid.php \Drupal\date_recur\DateRecurPartGrid::allowParts()
Adds parts for a frequency to the allow list.
Parameters
string $frequency: A frequency.
string[] $parts: An array of parts.
File
- src/
DateRecurPartGrid.php, line 31
Class
- DateRecurPartGrid
- Frequency/part support grid.
Namespace
Drupal\date_recurCode
public function allowParts(string $frequency, array $parts) : void {
$existingFrequencyParts = $this->allowedParts[$frequency] ?? [];
$this->allowedParts[$frequency] = array_merge($parts, $existingFrequencyParts);
}