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;
    }
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;
    }
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 ; }
Get the parameter for the 'order by' part of a query.

This is tightly coupled to $this->getContent()

@param array  $contenttype
@param string $orderValue

@return string
Get the parameter for the order by part of a query .