function _notify_get_content_types in Notify 8
Same name and namespace in other branches
- 7 notify.module \_notify_get_content_types()
- 2.0.x notify.module \_notify_get_content_types()
- 1.0.x notify.module \_notify_get_content_types()
Helper function to get array of tracked types.
Parameters
array $ntype: Reference to array with tracked types.
bool $foop: TRUE if we return full list if empty,
1 call to _notify_get_content_types()
- _notify_send in ./
notify.module - Helper function to send the notification e-mail batch.
File
- ./
notify.module, line 203 - Notify module sends e-mail digests of new content and comments.
Code
function _notify_get_content_types(&$ntype, $foop) {
$config = \Drupal::config('notify.settings');
$ntype = array();
foreach (NodeType::loadMultiple() as $type => $object) {
if ($config
->get(NOTIFY_NODE_TYPE . $type)) {
$ntype[] = $type;
}
}
if ($foop && count($ntype) < 1) {
foreach (NodeType::loadMultiple() as $type => $name) {
$ntype[] = $type;
}
}
}