class CMSHelper

Base Helper class.

Methods

string
getCurrentLanguage( boolean $detectBrowser = true)

Gets the current language

integer
getLanguageId( string $langCode)

Gets the associated language ID

array
getRowData( TableInterface $table)

Gets a row of data from a table

getDataObject( TableInterface $table)

Method to get an object containing all of the table columns and values.

Details

string getCurrentLanguage( boolean $detectBrowser = true)

Gets the current language

Parameters

boolean $detectBrowser Flag indicating whether to use the browser language as a fallback.

Return Value

string The language string

integer getLanguageId( string $langCode)

Gets the associated language ID

Parameters

string $langCode The language code to look up

Return Value

integer The language ID

array getRowData( TableInterface $table)

Gets a row of data from a table

Parameters

TableInterface $table Table instance for a row.

Return Value

array Associative array of all columns and values for a row in a table.

stdClass getDataObject( TableInterface $table)

Method to get an object containing all of the table columns and values.

Parameters

TableInterface $table Table object.

Return Value

stdClass Contains all of the columns and values.