class ContentHelper

Helper for standard content style extensions.

This class mainly simplifies static helper methods often repeated in individual components

Methods

static  void
addSubmenu( string $vName)

Configure the Linkbar. Must be implemented by each extension.

static  stdClass[]
countRelations( stdClass[] $items, stdClass $config)

Adds Count relations for Category and Tag Managers

static  JObject
_getActions( integer $categoryId, integer $id, string $assetName = '')

Gets a list of the actions that can be performed.

static  JObject
getActions( string $component = '', string $section = '', integer $id)

Gets a list of the actions that can be performed.

static  string
getCurrentLanguage( boolean $detectBrowser = true)

Gets the current language

static  integer
getLanguageId( string $langCode)

Gets the associated language ID

array
getRowData( Table $table)

Gets a row of data from a table

Details

static void addSubmenu( string $vName)

Configure the Linkbar. Must be implemented by each extension.

Parameters

string $vName The name of the active view.

Return Value

void

static stdClass[] countRelations( stdClass[] $items, stdClass $config)

Adds Count relations for Category and Tag Managers

Parameters

stdClass[] $items &$items The category or tag objects
stdClass $config Configuration object allowing to use a custom relations table

Return Value

stdClass[]

static JObject _getActions( integer $categoryId, integer $id, string $assetName = '')

Gets a list of the actions that can be performed.

Parameters

integer $categoryId The category ID.
integer $id The item ID.
string $assetName The asset name

Return Value

JObject

static JObject getActions( string $component = '', string $section = '', integer $id)

Gets a list of the actions that can be performed.

Parameters

string $component The component name.
string $section The access section name.
integer $id The item ID.

Return Value

JObject

static 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

static 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( Table $table)

Gets a row of data from a table

Parameters

Table $table Table instance for a row.

Return Value

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