You are here

public function SendinblueManager::getAttributeLists in SendinBlue 8

Same name and namespace in other branches
  1. 8.2 src/SendinblueManager.php \Drupal\sendinblue\SendinblueManager::getAttributeLists()

Get Attribute lists.

Return value

\Drupal\sendinblue\Tools\Model\GetAttributesAttributes[] An array of attributes.

File

src/SendinblueManager.php, line 512

Class

SendinblueManager
Basic manager of module.

Namespace

Drupal\sendinblue

Code

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