Logic triggered after comment was successfully saved.

@param \Cake\Datasource\EntityInterface $comment Comment that was just saved
@return void
197186
protected function _afterSave(EntityInterface $comment)
    {
        $successMessage = $this->config('successMessage');
        if (is_callable($successMessage)) {
            $successMessage = $successMessage($comment, $this->_controller);
        }

        $this->_controller->Flash->success($successMessage, ['key' => 'commentsForm']);
        if ($this->config('redirectOnSuccess')) {
            $redirectTo = $this->config('redirectOnSuccess') === true ? $this->_controller->referer() : $this->config('redirectOnSuccess');
            $this->_controller->redirect($redirectTo);
        }
    }
976628
public function removeComment(\Gpupo\CommonSchema\ORM\Entity\Trading\Order\Shipping\Comment\Comment $comment)
    {
        return $this->comments->removeElement($comment);
    }
1279462
public function addComment($comment)
    {
        $comment->setPaymentId($this->getPaymentId());
        $comment->save();

        $this->load($this->getPaymentId());

        return $comment;
    }
1133994
public function addComment(\Haven\CmsBundle\Entity\Comment $comment)
    {
        $comment->setContent($this);
        $this->comments[] = $comment;

        return $this;
    }
620907
public function removeComment(Comment $comment)
    {
        if ($this->comments->contains($comment)) {
            $this->comments->removeElement($comment);
        }
    }
1303783
public function addComment($user, string $comment) : Comment
    {
        return $this->comments()->create([
            'user_id' => $user->id,
            'comment' => $comment,
        ]);
    }
112967
public void setComment(String comment) {
		this.comment = comment;
		if (!Strings.isEmpty(comment)) {
			this.name = MessageFormat.format("{0} [{1}]", getClass().getName(), comment); //$NON-NLS-1$
		} else {
			this.name = getClass().getName();
		}
	}
531860
public function Comment($CommentID) {
      // Get the discussionID
      $Comment = $this->CommentModel->GetID($CommentID);
      if (!$Comment)
         throw NotFoundException('Comment');
         
      $DiscussionID = $Comment->DiscussionID;
      
      // Figure out how many comments are before this one
      $Offset = $this->CommentModel->GetOffset($Comment);
      $Limit = Gdn::Config('Vanilla.Comments.PerPage', 30);
      
      $PageNumber = PageNumber($Offset, $Limit, TRUE);
      $this->SetData('Page', $PageNumber);
      
      $this->View = 'index';
      $this->Index($DiscussionID, 'x', $PageNumber);
   }
509514
public function add($comment)
    {
        $comments = $this->session->get('comments', []);
        $comments[] = $comment;
        $this->session->set('comments', $comments);
    }
329316
public function addComment(\Gpupo\CommonSchema\ORM\Entity\Trading\Order\Shipping\Comment\Comment $comment)
    {
        $this->comments[] = $comment;

        return $this;
    }
590379
public function afterSave(Event $event, EntityInterface $entity)
    {
        $property = $this->versionAssociation()->getProperty();
        $entity->unsetProperty($property);
    }
89328
public function setComment(\AgentSIB\Diadoc\Api\Proto\Docflow\Entity $value = null)
    {
        $this->Comment = $value;
    }
1130211
public function addComment($comment)
    {
        if ($this->comments === null) {
            $this->comments = [];
        }
        $this->comments[] = $comment;
    }
1137578
public function dispatchCommentPreRemoveEvent(CommentInterface $comment)
    {
        $event = new CommentPreRemoveEvent(
            $comment
        );

        $this
            ->eventDispatcher
            ->dispatch(ElcodiCommentEvents::COMMENT_PREREMOVE, $event);

        return $this;
    }
493637
public function removeComment(\Innova\CollecticielBundle\Entity\Comment $comments)
    {
        $this->comments->removeElement($comments);
    }
87760
public function markDoctrineTypeCommented($doctrineType)
    {
        if ($this->doctrineTypeComments === null) {
            $this->initializeCommentedDoctrineTypes();
        }

        assert(is_array($this->doctrineTypeComments));

        $this->doctrineTypeComments[] = $doctrineType instanceof Type ? $doctrineType->getName() : $doctrineType;
    }
535122
public function changeComment($comment)
    {
        $this->actions->addAction(new ChangeComment($this->table, $comment));

        return $this;
    }