Bolt\Legacy\Storage::decodeQueryOrder PHP Method

decodeQueryOrder() private method

This is tightly coupled to $this->getContent()
private decodeQueryOrder ( array $contenttype, string $orderValue ) : string
$contenttype array
$orderValue string
return string
    private function decodeQueryOrder($contenttype, $orderValue)
    {
        $order = false;
        if ($orderValue === false || $orderValue === '') {
            if ($this->isValidColumn($contenttype['sort'], $contenttype, true)) {
                $order = $this->getEscapedSortorder($contenttype['sort'], false);
            }
        } else {
            $parOrder = Str::makeSafe($orderValue);
            if ($parOrder == 'RANDOM') {
                $dboptions = $this->app['db']->getParams();
                $order = $dboptions['randomfunction'];
            } elseif ($this->isValidColumn($parOrder, $contenttype, true)) {
                $order = $this->getEscapedSortorder($parOrder, false);
            }
        }
        return $order;
    }