Get configured comments order
@return string
421680
public static function getCommentsSort() {
		$user_setting = elgg_get_plugin_user_setting('comments_order', 0, 'hypeInteractions');
		$setting = $user_setting ?: elgg_get_plugin_setting('comments_order', 'hypeInteractions');
		if ($setting == 'asc') {
			$setting = 'time_created::asc';
		} else if ($setting == 'desc') {
			$setting = 'time_created::desc';
		}
		return $setting;
	}
570735
protected function getDiscountLinesOrder()
    {
        $result = array();

        foreach ($this->order->getCartRules() as $line) {
            $result[] = $this->getDiscountLineOrder($line);
        }

        return $result;
    }
655127
protected function getMarkupComment()
    {
        $markupComment = null;

        foreach ($this->getCommentSections() as $commentSection) {
            // Identify the markup comment by the Markup: marker
            if (preg_match('/^\s*Markup:/i', $commentSection)) {
                $markupComment = $commentSection;
                break;
            }
        }

        return $markupComment;
    }
679817
protected function _getSorting()
    {
        $sOrder = '';
        if (\OxidEsales\Eshop\Core\Registry::getConfig()->getRequestParameter('synchoxid')) {
            $sOrder = parent::_getSorting();
        } elseif (($aSkipArt = \OxidEsales\Eshop\Core\Registry::getSession()->getVariable('neworder_sess'))) {
            $sOrderBy = '';
            $sArtTable = $this->_getViewName('oxarticles');
            $sSep = '';
            foreach ($aSkipArt as $sId) {
                $sOrderBy = " $sArtTable.oxid=" . \OxidEsales\Eshop\Core\DatabaseProvider::getDb()->quote($sId) . " " . $sSep . $sOrderBy;
                $sSep = ", ";
            }
            $sOrder = "order by " . $sOrderBy;
        }

        return $sOrder;
    }
921033
public function getComment()
    {
        if (!$this->_commentFetched) {
            $this->_comment = $this->_fetchComment();
            $this->_commentFetched = true;
        }
        return $this->_comment;
    }
704494
public function getCommentsEnabled()
    {
        // Don't display comments form for pseudo-pages (such as the login form)
        if (!$this->owner->exists()) {
            return false;
        }

        // Determine which flag should be used to determine if this is enabled
        if ($this->owner->getCommentsOption('enabled_cms')) {
            return (bool) $this->owner->ProvideComments;
        }

        return (bool) $this->owner->getCommentsOption('enabled');
    }
570056
protected function index()
    {
        $comments = $this->repository
        ->pushCriteria(app('Litepie\Repository\Criteria\RequestCriteria'))
        ->scopeQuery(function($query){
            return $query->orderBy('id','DESC');
        })->paginate();


        return $this->response->title(trans('blog::comment.names'))
            ->view('blog::public.comment.index')
            ->data(compact('comments'))
            ->output();
    }
878425
public function get_comments( $count = null, $order = 'wp', $type = 'comment', $status = 'approve', $CommentClass = 'Timber\Comment' ) {
		return $this->comments($count, $order, $type, $status, $CommentClass);
	}
591614
public function getComments($filter = null)
    {
        $comments = $this->comments;

        if ($filter !== null) {
            $comments = array_filter($comments, function ($c) use ($filter) {
                return $c['context'] == $filter;
            });
        }

        return $comments;
    }
350739
public function ordering()
    {
        if ($this->orderCallback) {
            return call_user_func($this->orderCallback, $this->resolveCallbackParameter());
        }

        return $this->defaultOrdering();
    }
848089
public function getValidatedComments()
    {
        $app = App::getInstance();

        $comments = (new CommentManager())
            ->filter("article = %i", array($this->getId()))
            ->filter("active = 1")
            ->filter("spam = 0 ");

        $validation = BaseManager::build('FelixOnline\Core\EmailValidation', 'email_validation')
            ->filter("confirmed = 1");

        $comments->join($validation, null, 'email', 'email');

        $comments = $comments->values();

        $comments = is_null($comments) ? array() : $comments;

        return $comments;
    }
15898
public function lexComment()
    {
        $source = $this->source;
        if ($source->cursor >= $source->bound) {
            $this->addError("The parser did not find the '{$source->leftDelimiter}*' comment start tag.", $source->cursor);
            return null;
        }
        Rules::reset($source->leftDelimiter, $source->rightDelimiter);
        $ret = $this->find('@' . preg_quote($source->leftDelimiter . '*', '@') . '@', null, true);
        if ($ret == null) {
            $this->addError("The parser did not find the '{$source->leftDelimiter}*' comment start tag.", $source->cursor);
            return null;
        }
        $source->cursor = $ret['end'];
        $ret = $this->find('@' . preg_quote('*' . $source->rightDelimiter, '@') . '@', null, true);
        if ($ret == null) {
            $this->addError("The parser did not find the '*{$source->rightDelimiter}' comment end tag.", $source->cursor);
            return null;
        }
        $source->cursor = $ret['end'];
        return ['map' => null, 'code' => null, 'next' => 'parsHtml'];
    }
563104
public function get_comment_object() {
        global $CFG;
        require_once($CFG->dirroot . '/comment/lib.php');

        if (!$this->get('id')) {
            throw new \coding_exception('The plan must exist.');
        }

        $comment = new comment((object) array(
            'client_id' => 'plancommentarea' . $this->get('id'),
            'context' => $this->get_context(),
            'component' => 'competency',    // This cannot be named 'core_competency'.
            'itemid' => $this->get('id'),
            'area' => 'plan',
            'showcount' => true,
        ));
        $comment->set_fullwidth(true);
        return $comment;
    }
984934
public function getOrdering()
    {
        // if the following code fails, fall back to this default ordering
        $orderBy = $this->conf['sortWithoutSearchword'];

        // if sorting in FE is allowed
        if ($this->conf['showSortInFrontend']) {
            $piVarsField = $this->pObj->piVars['sortByField'];
            $piVarsDir = $this->pObj->piVars['sortByDir'];
            $piVarsDir = ($piVarsDir == '') ? 'asc' : $piVarsDir;
            if (!empty($piVarsField)) { // if an ordering field is defined by GET/POST
                $isInList = GeneralUtility::inList($this->conf['sortByVisitor'], $piVarsField);
                if ($this->conf['sortByVisitor'] != '' && $isInList) {
                    $orderBy = $piVarsField . ' ' . $piVarsDir;
                }
                // if sortByVisitor is not set OR not in the list of
                // allowed fields then use fallback ordering in "sortWithoutSearchword"
            }
            // if sortByVisitor is not set OR not in the list of
            //allowed fields then use fallback ordering in "sortWithoutSearchword"
        } else {
            if (!empty($this->pObj->wordsAgainst)) { // if sorting is predefined by admin
                $orderBy = $this->conf['sortByAdmin'];
            } else {
                $orderBy = $this->conf['sortWithoutSearchword'];
            }
        }

        return $orderBy;
    }
97312
public function AllVisibleComments()
    {
        $list = $this->AllComments();

        // Filter spam comments for non-administrators if configured
        $showSpam = $this->owner->getCommentsOption('frontend_spam') && $this->owner->canModerateComments();

        if (!$showSpam) {
            $list = $list->filter('IsSpam', 0);
        }

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

        $this->owner->extend('updateAllVisibleComments', $list);
        return $list;
    }
948107
public function getNextVersionComments()
    {
        $c = Page::getByID($this->getCollectionID(), 'ACTIVE');
        $cvID = $c->getVersionID();

        return t('Version %d', $cvID + 1);
    }
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;
    }