protected function DigestIntervalActionDeriver::getDigestNotifiers in Message Digest 8
Helper method to get digest notifiers.
Also appends the 'send immediately' non-plugin.
1 call to DigestIntervalActionDeriver::getDigestNotifiers()
- DigestIntervalActionDeriver::getDerivativeDefinitions in message_digest_ui/
src/ Plugin/ Derivative/ DigestIntervalActionDeriver.php - Gets the definition of all derivatives of a base plugin.
File
- message_digest_ui/
src/ Plugin/ Derivative/ DigestIntervalActionDeriver.php, line 83
Class
- DigestIntervalActionDeriver
- Derives action plugins for changing digest intervals.
Namespace
Drupal\message_digest_ui\Plugin\DerivativeCode
protected function getDigestNotifiers() {
$values = [
$this
->t('Send immediately'),
];
foreach ($this->messageNotifier
->getDefinitions() as $plugin_id => $plugin_definition) {
// Strip off the prefix.
$plugin_id = str_replace('message_digest:', '', $plugin_id);
if (is_subclass_of($plugin_definition['class'], DigestInterface::class)) {
$values[$plugin_id] = $plugin_definition['title'];
}
}
return $values;
}