public function toArray() { $data[] = $this->getActionMetadata(); if ($this->hasSource()) { $data[] = $this->getSource(); } return $data; }