Allows you to add a new comment to an existing credit memo.
Email notification can be sent to the user email.

@param string $creditmemoIncrementId
@param string $comment
@param string $notifyCustomer
@param string $includeComment

@return ActionInterface
327311
public function addComment($creditmemoIncrementId, $comment = null, $notifyCustomer = null, $includeComment = null)
    {
        return $this->__createAction('order_creditmemo.addComment', func_get_args());
    }
282478
public function addComment(string $comment) : bool
    {
        if (is_string($comment)) {
            $this->comments[] = $comment;
        }

        return true;
    }
426841
def update_invoice_comment(self, invoice_comment_id, invoice_comment_dict):
        
        return self._create_put_request(
            resource=INVOICE_COMMENTS,
            billomat_id=invoice_comment_id,
            send_data=invoice_comment_dict
        )
1130211
public function addComment($comment)
    {
        if ($this->comments === null) {
            $this->comments = [];
        }
        $this->comments[] = $comment;
    }
101951
def on_commenting(self, comment):
        """"""

        def update():
            context = self.host.cached_context
            context.data["comment"] = comment
            self.data["comment"] = comment

            # Notify subscribers of the comment
            self.comment_sync(comment)

            self.commented.emit()

        # Update local cache a little later
        util.schedule(update, 100, channel="commenting")
755546
public void addComment(Comment comment) {
        if (comments == null || comments.size() == 0) {
            comments = new ArrayList<Comment>();
        }

        comments.add((CommentImpl) comment);
    }
160226
public function onAfterPostComment(Comment $comment)
    {
        $parent = $comment->Parent();

        if (!$parent || !$parent->hasMethod('notificationRecipients')) {
            return;
        }

        // Ask parent to submit all recipients
        $recipients = $parent->notificationRecipients($comment);

        foreach ($recipients as $recipient) {
            $this->notifyCommentRecipient($comment, $parent, $recipient);
        }
    }
849388
public function reply($comment)
    {
        $parameter = new ClientValueObject();
        $parameter->setProperty("Comment",$comment);
        $qry = new InvokePostMethodQuery($this->getResourcePath(),"Reply",null,$parameter);
        $this->getContext()->addQuery($qry);
    }
718565
public function sendCommentSpamRequestMail( $comment, $updatePath ) {

		$siteName		= $this->coreProperties->getSiteName();
		$fromEmail		= $this->mailProperties->getSenderEmail();
		$fromName		= $this->mailProperties->getSenderName();
		$contactEmail	= $this->mailProperties->getContactEmail();

		// Send Mail
		$this->getMailer()->compose( self::MAIL_COMMENT_SPAM_REQUEST, [ 'coreProperties' => $this->coreProperties, 'comment' => $comment, 'updatePath' => $updatePath ] )
			->setTo( $contactEmail )
			->setFrom( [ $fromEmail => "$fromName | $siteName" ] )
			->setSubject( "Spam Request | " . $this->coreProperties->getSiteName() )
			//->setTextBody( "heroor" )
			->send();
	}
1085099
public function update(CommentUpdateRequest $request, Comment $comment)
    {
        $this->authorize($comment);
        
        $comment->update($request->only(['content']));
        
        return $this->makeRedirect(true, 'admin.comments.index', sprintf(
            __('msg.update'), $comment->url, route('admin.comments.edit', $comment)
        ));
    }
120115
public function updateComment()
    {
        $newComment = $_POST['comment'] ?? null;
        $commentId = $_POST['commentId'] ?? null;

        if (!$newComment || !$commentId || !$comment = get_comment($commentId)) {
            wp_send_json_error('Missing variables');
        }

        if (!current_user_can('edit_comment', $comment->comment_ID) && !($comment->user_id == get_current_user_id())) {
            wp_send_json_error('Missing authorization');
        }

        // Validate nonce
        if (!check_ajax_referer("update-comment_$comment->comment_ID", 'nonce', false)) {
            wp_send_json_error('Nonce failed');
        }

        $comment->comment_content = $newComment;
        if (wp_update_comment((array) $comment)) {
            wp_send_json_success('Update was successful');
        }

        wp_send_json();
    }
1344270
def notify_admin_of_new_comment(comID):
    
    comment = query_get_comment(comID)
    if len(comment) > 0:
        (comID2,
         id_bibrec,
         id_user,
         body,
         date_creation,
         star_score, nb_votes_yes, nb_votes_total,
         title,
         nb_abuse_reports, round_name, restriction) = comment
    else:
        return
    user_info = query_get_user_contact_info(id_user)
    if len(user_info) > 0:
        (nickname, email, last_login) = user_info
        if not len(nickname) > 0:
            nickname = email.split('@')[0]
    else:
        nickname = email = "ERROR: Could not retrieve"

    review_stuff = '''
    Star score  = %s
    Title       = %s''' % (star_score, title)

    washer = EmailWasher()
    try:
        body = washer.wash(body)
    except:
        body = cgi.escape(body)

    record_info = webcomment_templates.tmpl_email_new_comment_admin(id_bibrec)
    out = '''
The following %(comment_or_review)s has just been posted (%(date)s).

AUTHOR:
    Nickname    = %(nickname)s
    Email       = %(email)s
    User ID     = %(uid)s

RECORD CONCERNED:
    Record ID   = %(recID)s
    URL         = <%(siteurl)s/%(CFG_SITE_RECORD)s/%(recID)s/%(comments_or_reviews)s/>
%(record_details)s

%(comment_or_review_caps)s:
    %(comment_or_review)s ID    = %(comID)s %(review_stuff)s
    Body        =
<--------------->
%(body)s

<--------------->
ADMIN OPTIONS:
To moderate the %(comment_or_review)s go to %(siteurl)s/%(CFG_SITE_RECORD)s/%(recID)s/%(comments_or_reviews)s/display?%(arguments)s
    ''' % \
        {'comment_or_review': star_score > 0 and 'review' or 'comment',
            'comment_or_review_caps': star_score > 0 and 'REVIEW' or 'COMMENT',
            'comments_or_reviews': star_score > 0 and 'reviews' or 'comments',
            'date': date_creation,
            'nickname': nickname,
            'email': email,
            'uid': id_user,
            'recID': id_bibrec,
            'record_details': record_info,
            'comID': comID2,
            'review_stuff': star_score > 0 and review_stuff or "",
            'body': body.replace('<br />', '\n'),
            'siteurl': CFG_SITE_URL,
            'CFG_SITE_RECORD': CFG_SITE_RECORD,
            'arguments': 'ln=en&do=od#%s' % comID
         }

    from_addr = '%s WebComment <%s>' % (
        CFG_SITE_NAME, CFG_WEBALERT_ALERT_ENGINE_EMAIL)
    comment_collection = get_comment_collection(comID)
    to_addrs = get_collection_moderators(comment_collection)

    rec_collection = guess_primary_collection_of_a_record(id_bibrec)
    report_nums = get_fieldvalues(id_bibrec, "037__a")
    report_nums += get_fieldvalues(id_bibrec, "088__a")
    report_nums = ', '.join(report_nums)
    subject = "A new comment/review has just been posted [%s|%s]" % (
        rec_collection, report_nums)

    send_email(from_addr, to_addrs, subject, out)
483977
def update_confirmation_comment(self, confirmation_comment_id, confirmation_comment_dict):
        
        return self._create_put_request(
            resource=CONFIRMATION_COMMENTS,
            billomat_id=confirmation_comment_id,
            send_data=confirmation_comment_dict
        )
881415
@Override
  public void createAttachmentComment(String taskId, String processInstanceId, String attachmentName, boolean create) {
    if (isHistoryEnabled()) {
      String userId = Authentication.getAuthenticatedUserId();
      CommentEntity comment = getCommentEntityManager().create();
      comment.setUserId(userId);
      comment.setType(CommentEntity.TYPE_EVENT);
      comment.setTime(getClock().getCurrentTime());
      comment.setTaskId(taskId);
      comment.setProcessInstanceId(processInstanceId);
      if (create) {
        comment.setAction(Event.ACTION_ADD_ATTACHMENT);
      } else {
        comment.setAction(Event.ACTION_DELETE_ATTACHMENT);
      }
      comment.setMessage(attachmentName);
      getCommentEntityManager().insert(comment);
    }
  }
55554
public void updateComment(int commentId, CommentUpdate comment) {
		getResourceFactory().getApiResource("/comment/" + commentId)
				.entity(comment, MediaType.APPLICATION_JSON_TYPE).put();
	}
21253
def email(self, comment, content_object, request):
        
        if not self.email_notification:
            return

        send_comment_posted(comment, request)
873786
public function checkIn($comment)
    {
        $qry = new InvokePostMethodQuery($this->getResourcePath(), "checkIn", array(
            "comment" => $comment,
            "checkintype" => 0
        ));
        $this->getContext()->addQuery($qry);
    }