function simplenews_newsletter_list in Simplenews 8
Same name and namespace in other branches
- 8.2 simplenews.module \simplenews_newsletter_list()
- 7.2 simplenews.module \simplenews_newsletter_list()
- 3.x simplenews.module \simplenews_newsletter_list()
Get list of simplenews categories with translated names.
@todo Maybe refactor this method to simplenews_newsletter_name_list.
Return value
array of newsletter names. Translated if required.
3 calls to simplenews_newsletter_list()
- SubscriberExportForm::buildForm in src/
Form/ SubscriberExportForm.php - Form constructor.
- SubscriberMassSubscribeForm::buildForm in src/
Form/ SubscriberMassSubscribeForm.php - Form constructor.
- SubscriberMassUnsubscribeForm::buildForm in src/
Form/ SubscriberMassUnsubscribeForm.php - Form constructor.
2 string references to 'simplenews_newsletter_list'
- simplenews_field_views_data in ./
simplenews.views.inc - Implements hook_field_views_data().
- simplenews_rules_rules_action_info in simplenews_rules/
simplenews_rules.rules.inc - Implements hook_rules_action_info().
File
- ./
simplenews.module, line 751 - Simplenews node handling, sent email, newsletter block and general hooks
Code
function simplenews_newsletter_list() {
$newsletters = array();
foreach (simplenews_newsletter_get_all() as $id => $newsletter) {
$newsletters[$id] = Html::escape($newsletter
->label());
}
return $newsletters;
}