You are here

public function GetAttributesAttributes::__construct in SendinBlue 8

Same name and namespace in other branches
  1. 8.2 src/Tools/Model/GetAttributesAttributes.php \Drupal\sendinblue\Tools\Model\GetAttributesAttributes::__construct()

GetAttributesAttributes constructor.

Parameters

array $data:

File

src/Tools/Model/GetAttributesAttributes.php, line 33

Class

GetAttributesAttributes
Class GetAttributesAttributes.

Namespace

Drupal\sendinblue\Tools\Model

Code

public function __construct(array $data = []) {
  $this->name = $data['name'];
  $this->type = $data['type'] ?? NULL;
  $this->category = $data['category'];
  if (!empty($data['calculatedValue'])) {
    $this->calculatedValue = $data['calculatedValue'];
  }
  if (!empty($data['enumeration'])) {
    foreach ($data['enumeration'] as $enumeration) {
      $this->enumeration[] = new GetAttributesEnumeration($enumeration);
    }
  }
}