/** * @return ConversationInterface */ public function getConversationEntity() { if (empty($this->conversationEntity)) { $conversationEntityClass = $this->options->getConversationEntity(); $this->conversationEntity = new $conversationEntityClass(); } return $this->conversationEntity; }
/** * @param string $conversationId * @return ConversationInterface|object */ public function getConversation($conversationId) { $conversation = $this->objectManager->find($this->options->getConversationEntity(), $conversationId); $this->getEventManager()->trigger('getConversation', $this, ['conversation' => $conversation]); return $conversation; }