Lists comments of an application

@return array
497606
public function listAction()
    {
        $repository = $this->repositories->get('Applications/Application');
        $applicationId = $this->params()->fromQuery('applicationId', 0);
        $application = $repository->find($applicationId); /* @var \Applications\Entity\Application $application */
        
        $this->acl($application, 'read');
        
        return array(
            'comments' => $application->getComments(),
        );
    }
832710
public function Replies()
    {
        // No replies if disabled
        if (!$this->getRepliesEnabled()) {
            return new ArrayList();
        }
        $list = $this->AllReplies();

        // Filter spam comments for non-administrators if configured
        $parent = $this->Parent();
        $showSpam = $this->getOption('frontend_spam') && $parent && $parent->canModerateComments();
        if (!$showSpam) {
            $list = $list->filter('IsSpam', 0);
        }

        // Filter un-moderated comments for non-administrators if moderation is enabled
        $showUnmoderated = $parent && (
            ($parent->ModerationRequired === 'None')
            || ($this->getOption('frontend_moderation') && $parent->canModerateComments())
        );
        if (!$showUnmoderated) {
            $list = $list->filter('Moderated', 1);
        }

        $this->extend('updateReplies', $list);
        return $list;
    }
1263834
public function PagedComments()
    {
        $list = $this->Comments();

        // Add pagination
        $list = PaginatedList::create($list, Controller::curr()->getRequest());
        $list->setPaginationGetVar('commentsstart' . $this->owner->ID);
        $list->setPageLength($this->owner->getCommentsOption('comments_per_page'));

        $this->owner->extend('updatePagedComments', $list);
        return $list;
    }
284983
def get_comments(self):
        """"""
        url = self._imgur._base_url + "/3/gallery/{0}/comments".format(self.id)
        resp = self._imgur._send_request(url)
        return [Comment(com, self._imgur) for com in resp]
86609
public function Comment() {
      $this->Permission('Garden.Profiles.Edit');
      
      $Session = Gdn::Session();
      $this->Form->SetModel($this->ActivityModel);
      $NewActivityID = 0;
      
      // Form submitted
      if ($this->Form->IsPostBack()) {
         $Body = $this->Form->GetValue('Body', '');
         $ActivityID = $this->Form->GetValue('ActivityID', '');
         if (is_numeric($ActivityID) && $ActivityID > 0) {
            $ActivityComment = array(
                'ActivityID' => $ActivityID,
                'Body' => $Body,
                'Format' => 'Text');
            
            $ID = $this->ActivityModel->Comment($ActivityComment);
            
            if ($ID == SPAM || $ID == UNAPPROVED) {
               $this->StatusMessage = T('ActivityCommentRequiresApproval', 'Your comment will appear after it is approved.');
               $this->Render('Blank', 'Utility');
               return;
            }
            
            $this->Form->SetValidationResults($this->ActivityModel->ValidationResults());
            if ($this->Form->ErrorCount() > 0) {
               throw new Exception($this->ActivityModel->Validation->ResultsText());
               
               $this->ErrorMessage($this->Form->Errors());
            }
         }
      }
      
      // Redirect back to the sending location if this isn't an ajax request
      if ($this->_DeliveryType === DELIVERY_TYPE_ALL) {
         $Target = $this->Form->GetValue('Return');
         if (!$Target)
            $Target = '/activity';
         Redirect($Target);
      } else {
         // Load the newly added comment.
         $this->SetData('Comment', $this->ActivityModel->GetComment($ID));
         
         // Set it in the appropriate view.
         $this->View = 'comment';
      }

      // And render
      $this->Render();
   }
878425
public function get_comments( $count = null, $order = 'wp', $type = 'comment', $status = 'approve', $CommentClass = 'Timber\Comment' ) {
		return $this->comments($count, $order, $type, $status, $CommentClass);
	}
1318290
public function index()
    {
        Session::forget('install-module');

        $result = [];
        foreach ($this->extensions as $ext) {
            if (extension_loaded($ext)) {
                $result [$ext] = 'true';
            } else {
                $result [$ext] = false;
            }
        }

        return view('avored-install::install.extension')->with('result', $result);
    }
368964
function getCommentsList(comments) {
  if (!comments.body || !comments.headers) return;

  let pageInfo = getPage(comments.headers.link);
  let pageList = [];

  comments.body.forEach((item) => {
    pageList.push(getComments(item));
  });

  return {
    page: pageInfo,
    list: pageList
  }
}
427571
public function getCommentList()
    {
        if (is_null($this->commentList)) {
            $comments = oxNew(\OxidEsales\PayPalModule\Model\OrderPaymentCommentList::class);
            $comments->load($this->getPaymentId());
            $this->setCommentList($comments);
        }

        return $this->commentList;
    }
588462
def comments(self):
        

        endpoint = self.links["replies"]
        if self._comments is None:
            self._comments = Feed(endpoint, pypump=self._pump)
        return self._comments
777962
protected function getCommentSections()
    {
        if (empty($this->commentSections) && $this->rawComment) {
            $this->commentSections = explode("\n\n", $this->rawComment);
        }

        return $this->commentSections;
    }
903276
public function viewAction()
    {
        $comments = new \Phpmvc\Comment\CommentsInSession();
        $comments->setDI($this->di);

        $all = $comments->findAll();

        $this->views->add('comment/comments', [
            'comments' => $all,
        ]);
    }
1243426
public function AllComments()
    {
        $order = $this->owner->getCommentsOption('order_comments_by');
        $comments = Comment::get()
            ->filter('ParentID', $this->owner->ID)
            ->sort($order);
        $this->owner->extend('updateAllComments', $comments);
        return $comments;
    }
433299
public function commentsPopupLink()
    {
        $output = [];

        if (is_single() || post_password_required() || (!comments_open() || !get_comments_number())) {
            return '';
        }

        ob_start();
        comments_popup_link(
            __('Leave a comment', 'novusopress'),
            sprintf(__('%1$s1%2$s Comment', 'novusopress'), '<span class="badge">', '</span>'),
            sprintf(__('%1$s%%%2$s Comments', 'novusopress'), '<span class="badge">', '</span>'),
            'btn btn-default'
        );
        $link = ob_get_clean();

        $output[] = '<div class="comments-link-area pad-bottom">';
        $output[] = sprintf('<span class="comments-link">%s</span>', $link);
        $output[] = '</div>';

        return apply_filters('novusopress_view_comments_popup_link_output', implode('', $output));
    }
722000
protected function buildComments()
    {

        if( is_null( $this->comments ) ) {
            $this->comments = array();
        } else {
            return;
        }

        $sql = <<<SQL
SELECT
    a.attrelid::text || '.' || a.attnum AS key,
    d.description AS text
FROM
    pg_attribute AS a
INNER JOIN
    pg_description AS d ON
        a.attrelid = d.objoid AND
        a.attnum = d.objsubid AND
        d.classoid = 'pg_class'::regclass::oid
WHERE
    a.attnum > 0
;
SQL
;

        $comments = $this->db->query( new Query( $sql ) )->fetch();

        // key the array and populate static cache
        foreach( $comments as $comment ) {
            $this->comments[$comment['key']] = $comment['text'];
        }

    }
799439
def get_comments(self):
        
        # Lazily load info
        if self.info is None:
            self.get_info()

        if 'comments' in self.info:
            return [structure['text'] for structure in self.info['comments']['comments']]
        else:
            return []
785996
public function getCommentsCount()
    {
        //check whether workshett name is set or not
        if ($this->worksheetName == '')
            throw new Exception('Worksheet name not specified');
        $strURI = Product::$baseProductUri . '/cells/' . $this->getFileName() .
            '/worksheets/' . $this->worksheetName . '/comments';
        $signedURI = Utils::sign($strURI);
        $responseStream = Utils::processCommand($signedURI, 'GET', '', '');
        $json = json_decode($responseStream);
        return count($json->Comments->CommentList);

    }