You are here

public static function SendinblueManager::getAttributeLists in SendinBlue 7.2

Same name and namespace in other branches
  1. 7 includes/sendinblue.manage.inc \SendinblueManager::getAttributeLists()

Get Attribute lists.

Return value

array An array of attributes.

1 call to SendinblueManager::getAttributeLists()
sendinblue_signup_form in includes/sendinblue_signup.admin.inc
Return a form for adding/editing a sendinblue signup form.

File

includes/sendinblue.manage.inc, line 304
Manage class file.

Class

SendinblueManager
Basic manager of module.

Code

public static function getAttributeLists() {
  $sendinblueMailin = new SendinblueMailin();
  $sibAttributes = $sendinblueMailin
    ->getAttributes();
  if (!empty($sibAttributes
    ->getAttributes())) {
    $attributes = [];
    foreach ($sibAttributes
      ->getAttributes() as $attribute) {
      if ($attribute
        ->getCategory() === 'normal') {
        $attributes[] = $attribute;
      }
    }
    return $attributes;
  }
  return [];
}