You are here

public function BusinessRulesItemObject::toArray in Business Rules 8

Same name and namespace in other branches
  1. 2.x src/BusinessRulesItemObject.php \Drupal\business_rules\BusinessRulesItemObject::toArray()

Transform the object into array.

Return value

array The business rule item array representation:

  • id
  • type

weight.

File

src/BusinessRulesItemObject.php, line 156

Class

BusinessRulesItemObject
Class BusinessRulesItemObject.

Namespace

Drupal\business_rules

Code

public function toArray() {
  return [
    $this
      ->getId() => [
      'id' => $this
        ->getId(),
      'type' => $this
        ->getType(),
      'weight' => $this
        ->getWeight(),
    ],
  ];
}