Remove comment.

@param \Gpupo\CommonSchema\ORM\Entity\Trading\Order\Shipping\Comment\Comment $comment

@return bool TRUE if this collection contained the specified element, FALSE otherwise
976628
public function removeComment(\Gpupo\CommonSchema\ORM\Entity\Trading\Order\Shipping\Comment\Comment $comment)
    {
        return $this->comments->removeElement($comment);
    }
251162
public function edit(Comment $comment)
    {
        $this->authorize($comment);

        pageinfo([
            'title' => __('comments.edit_page'),
            'robots' => 'noindex,follow',
        ]);

        return $this->makeResponse('edit', compact('comment'));
    }
177962
public function removeComment(\Haven\CmsBundle\Entity\Comment $comment)
    {
        $this->comments->removeElement($comment);
    }
39907
private function isConditionalComment($comment): bool
    {
        if (\preg_match('/^\[if [^\]]+\]/', $comment)) {
            return true;
        }

        if (\preg_match('/\[endif\]$/', $comment)) {
            return true;
        }

        return false;
    }
188006
public function stripTags($comment_text, $comment)
    {
        $allowedTags = array(
            "<h1>", "<h2>", "<h3>", "<h4>",
            "<strong>","<b>",
            "<br>", "<hr>",
            "<em>",
            "<ol>","<ul>","<li>",
            "<p>", "<span>", "<a>", "<img>",
            "<del>", "<ins>",
            "<blockquote>"
        );

        $allowedAttributes = array('href', 'class', 'rel', 'id', 'src');

        return \Municipio\Helper\Html::stripTagsAndAtts($comment_text, $allowedTags, $allowedAttributes);
    }
131079
public function remove(string $comment, array $params = [])
    {
        $path = $this->buildCommentsPath($comment);

        return $this->delete($path, $params);
    }
1137578
public function dispatchCommentPreRemoveEvent(CommentInterface $comment)
    {
        $event = new CommentPreRemoveEvent(
            $comment
        );

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

        return $this;
    }
1303783
public function addComment($user, string $comment) : Comment
    {
        return $this->comments()->create([
            'user_id' => $user->id,
            'comment' => $comment,
        ]);
    }
854528
public function addComment($comment)
    {
        if (!in_array($comment, $this->comments, true)) {
            $this->comments[] = $comment;
        }

        return $this;
    }
971566
public function updateComment( $comment, $user=null, $time = null , $notified = null )
    {
        if ( $time === null )
        {
            $time = time();
        }

        $beforeUpdating = $this->beforeUpdatingComment( $comment, $notified, $time );
        if ( $beforeUpdating !== true )
        {
            return $beforeUpdating;
        }
        $comment->store();

        $afterUpdating = $this->afterUpdatingComment( $comment, $notified, $time );
        if ( $afterUpdating !== true )
        {
            return $afterUpdating;
        }
        return true;
    }
739664
protected function cleanInput($comment)
    {
        $comment = trim(
            preg_replace(
                '#[ \t]*(?:\/\*\*|\*\/|\*)?[ \t]{0,1}(.*)?#u',
                '$1',
                $comment
            )
        );

        // reg ex above is not able to remove */ from a single line docblock
        if (substr($comment, -2) == '*/') {
            $comment = trim(substr($comment, 0, -2));
        }

        // normalize strings
        $comment = str_replace(array("\r\n", "\r"), "\n", $comment);

        return $comment;
    }
863373
public function setComment($comment)
    {
        if ($comment != $this->getComment() and $this->_setComment($comment))
        {
            $this->_comment = $comment;
        }
    }
700087
public function destroy(Comment $comment)
    {
        $this->authorize('delete-comment', $comment);

        $comment->delete();

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

        return $this;
    }
432149
def delete_comment(self, *args, **kwargs):
        
        return bind_api(
            api=self,
            path='/comments/{commentId}/delete',
            method='DELETE',
            payload_type='comment',
            allowed_param=['commentId']
        )(*args, **kwargs)
398266
public function destroy(CommentRequest $request, Comment $comment)
    {
        try {

            $comment->delete();
            return $this->response->message(trans('messages.success.deleted', ['Module' => trans('blog::comment.name')]))
                ->code(202)
                ->status('success')
                ->url(guard_url('blog/comment/0'))
                ->redirect();

        } catch (Exception $e) {

            return $this->response->message($e->getMessage())
                ->code(400)
                ->status('error')
                ->url(guard_url('blog/comment/' . $comment->getRouteKey()))
                ->redirect();
        }

    }
282478
public function addComment(string $comment) : bool
    {
        if (is_string($comment)) {
            $this->comments[] = $comment;
        }

        return true;
    }