You are here

function mailchimp_get_list in Mailchimp 8

Same name and namespace in other branches
  1. 7.5 mailchimp.module \mailchimp_get_list()
  2. 7.2 mailchimp.module \mailchimp_get_list()
  3. 7.3 mailchimp.module \mailchimp_get_list()
  4. 7.4 mailchimp.module \mailchimp_get_list()
  5. 2.x mailchimp.module \mailchimp_get_list()

Returns a single list.

Parameters

string $list_id: The unique ID of the list provided by Mailchimp.

Return value

array Array of list data.

6 calls to mailchimp_get_list()
MailchimpListsSelectWidget::formElement in modules/mailchimp_lists/src/Plugin/Field/FieldWidget/MailchimpListsSelectWidget.php
Returns the form for a single field widget.
MailchimpListsSubscribeDefaultFormatter::viewElements in modules/mailchimp_lists/src/Plugin/Field/FieldFormatter/MailchimpListsSubscribeDefaultFormatter.php
Builds a renderable array for a field value.
MailchimpListsSubscribeForm::buildForm in modules/mailchimp_lists/src/Form/MailchimpListsSubscribeForm.php
Form constructor.
MailchimpListsTest::testGetList in modules/mailchimp_lists/src/Tests/MailchimpListsTest.php
Tests that a list can be loaded.
MailchimpListsWebhookSettingsForm::buildForm in modules/mailchimp_lists/src/Form/MailchimpListsWebhookSettingsForm.php
Form constructor.

... See full list

File

./mailchimp.module, line 125
Mailchimp module.

Code

function mailchimp_get_list($list_id) {
  $lists = mailchimp_get_lists([
    $list_id,
  ]);
  return reset($lists);
}