class ContentHelperQuery


Located at : UKNOWVA_ROOT/components/com_content/helpers/query.php

Content Component Query Helper

Methods

static string
orderbyPrimary(string $orderby)

Translate an order code to a field for primary category ordering.

static string
orderbySecondary(string $orderby, string $orderDate = 'created')

Translate an order code to a field for secondary category ordering.

static string
getQueryDate(string $orderDate)

Translate an order code to a field for primary category ordering.

static array
buildVotingQuery($params = null)

Get join information for the voting query.

static array
orderDownColumns(array $articles, integer $numColumns = 1)

Method to order the intro articles array for ordering down the columns instead of across.

Details

at line 31
static string orderbyPrimary(string $orderby)

Translate an order code to a field for primary category ordering.

Parameters

string $orderby The ordering code.

Return Value

string The SQL field(s) to order by.

at line 64
static string orderbySecondary(string $orderby, string $orderDate = 'created')

Translate an order code to a field for secondary category ordering.

Parameters

string $orderby The ordering code.
string $orderDate The ordering code for the date.

Return Value

string The SQL field(s) to order by.

at line 126
static string getQueryDate(string $orderDate)

Translate an order code to a field for primary category ordering.

Parameters

string $orderDate The ordering code.

Return Value

string The SQL field(s) to order by.

at line 156
static array buildVotingQuery($params = null)

Get join information for the voting query.

Parameters

$params

Return Value

array A named array with "select" and "join" keys.

at line 193
static array orderDownColumns(array $articles, integer $numColumns = 1)

Method to order the intro articles array for ordering down the columns instead of across.

The layout always lays the introtext articles out across columns. Array is reordered so that, when articles are displayed in index order across columns in the layout, the result is that the desired article ordering is achieved down the columns.

Parameters

array $articles Array of intro text articles
integer $numColumns Number of columns in the layout

Return Value

array Reordered array to achieve desired ordering down columns