Skip to content
Snippets Groups Projects
Commit 137b26e1 authored by catch's avatar catch
Browse files

Issue #3319184 by royalpinto007, bbombachini, sourabhjain, Rassoni,...

Issue #3319184 by royalpinto007, bbombachini, sourabhjain, Rassoni, smustgrave, Chi, catch, mstrelan: hook_condition_info_alter is not documented

(cherry picked from commit f0a4f3f1)
parent c83e16c6
No related branches found
No related tags found
No related merge requests found
......@@ -1986,6 +1986,20 @@ function hook_queue_info_alter(&$queues) {
$queues['mymodule_feeds']['cron']['time'] = 90;
}
/**
* Alter the information provided in \Drupal\Core\Condition\ConditionManager::getDefinitions().
*
* @param array $definitions
* The array of condition definitions.
*/
function hook_condition_info_alter(array &$definitions) {
// Add custom or modify existing condition definitions.
if (isset($definitions['node_type']) && $definitions['node_type']['class'] == 'Drupal\node\Plugin\Condition\NodeType') {
// If the node_type's class is unaltered, use a custom implementation.
$definitions['node_type']['class'] = 'Drupal\mymodule\Plugin\Condition\NodeType';
}
}
/**
* Alter an email message created with MailManagerInterface->mail().
*
......
0% Loading or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment