/** * Handle collection * * @param Transaction $baseTransaction Base transaction * @param ArrayCollection|CrudEntityInterface[] $data Data * * @return ArrayCollection|CollectionResponse */ private function handleCollection(Transaction $baseTransaction, ArrayCollection $data) { foreach ($data as $entity) { if ($entity instanceof CrudEntityInterface) { $transaction = clone $baseTransaction; $this->handleEntity($transaction, $entity); } } $this->noticeBuilder->setTransactionNotices($baseTransaction); $data = new CollectionResponse($data); $this->infoBuilder->setTransactionMessages($baseTransaction); return $data; }
/** * Add info message * * @param string $key Key * @param string $message Message * @return void */ public function addInfoMessage($key, $message) { $this->infoBuilder->addMessage($key, $message); }