_storeManager = $storeManager; } /** * Initialize resource model * * @return void */ protected function _construct() { $this->_init(\Magento\Sales\Model\ResourceModel\Order\Creditmemo\Comment::class); } /** * Declare Creditmemo instance * * @codeCoverageIgnore * * @param \Magento\Sales\Model\Order\Creditmemo $creditmemo * @return $this */ public function setCreditmemo(\Magento\Sales\Model\Order\Creditmemo $creditmemo) { $this->_creditmemo = $creditmemo; return $this; } /** * Retrieve Creditmemo instance * * @codeCoverageIgnore * * @return \Magento\Sales\Model\Order\Creditmemo */ public function getCreditmemo() { return $this->_creditmemo; } /** * Get store object * * @return \Magento\Store\Model\Store */ public function getStore() { if ($this->getCreditmemo()) { return $this->getCreditmemo()->getStore(); } return $this->_storeManager->getStore(); } //@codeCoverageIgnoreStart /** * Returns comment * * @return string */ public function getComment() { return $this->getData(CreditmemoCommentInterface::COMMENT); } /** * Returns created_at * * @return string */ public function getCreatedAt() { return $this->getData(CreditmemoCommentInterface::CREATED_AT); } /** * {@inheritdoc} */ public function setCreatedAt($createdAt) { return $this->setData(CreditmemoCommentInterface::CREATED_AT, $createdAt); } /** * Returns is_customer_notified * * @return int */ public function getIsCustomerNotified() { return $this->getData(CreditmemoCommentInterface::IS_CUSTOMER_NOTIFIED); } /** * Returns is_visible_on_front * * @return int */ public function getIsVisibleOnFront() { return $this->getData(CreditmemoCommentInterface::IS_VISIBLE_ON_FRONT); } /** * Returns parent_id * * @return int */ public function getParentId() { return $this->getData(CreditmemoCommentInterface::PARENT_ID); } /** * {@inheritdoc} */ public function setParentId($id) { return $this->setData(CreditmemoCommentInterface::PARENT_ID, $id); } /** * {@inheritdoc} */ public function setIsCustomerNotified($isCustomerNotified) { return $this->setData(CreditmemoCommentInterface::IS_CUSTOMER_NOTIFIED, $isCustomerNotified); } /** * {@inheritdoc} */ public function setIsVisibleOnFront($isVisibleOnFront) { return $this->setData(CreditmemoCommentInterface::IS_VISIBLE_ON_FRONT, $isVisibleOnFront); } /** * {@inheritdoc} */ public function setComment($comment) { return $this->setData(CreditmemoCommentInterface::COMMENT, $comment); } /** * {@inheritdoc} * * @return \Magento\Sales\Api\Data\CreditmemoCommentExtensionInterface|null */ public function getExtensionAttributes() { return $this->_getExtensionAttributes(); } /** * {@inheritdoc} * * @param \Magento\Sales\Api\Data\CreditmemoCommentExtensionInterface $extensionAttributes * @return $this */ public function setExtensionAttributes( \Magento\Sales\Api\Data\CreditmemoCommentExtensionInterface $extensionAttributes ) { return $this->_setExtensionAttributes($extensionAttributes); } //@codeCoverageIgnoreEnd }