ContentHelper

Helper for standard content style extensions.

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

since

3.1

package

Application

Methods

addSubmenu

Configure the Linkbar. Must be implemented by each extension.

addSubmenu(string vName) : void
static
since

3.1

Arguments

vName

stringThe name of the active view.

countRelations

Adds Count relations for Category and Tag Managers

countRelations(\stdClass[] &items, \stdClass config) : \stdClass[]
static
since

3.9.1

Arguments

items

\stdClass[]The category or tag objects

config

\stdClassConfiguration object allowing to use a custom relations table

Response

\stdClass[]

getActions

Gets a list of the actions that can be performed.

getActions(string component = '', string section = '', int id) : \Joomla\CMS\Object\CMSObject
static
since

3.2

Arguments

component

stringThe component name.

section

stringThe access section name.

id

intThe item ID.

Response

\Joomla\CMS\Object\CMSObject

getCurrentLanguage

Gets the current language

getCurrentLanguage(bool detectBrowser = true) : string
static
since

3.1

note

CmsHelper::getCurrentLanguage is the preferred method

Arguments

detectBrowser

boolFlag indicating whether to use the browser language as a fallback.

Response

stringThe language string

getLanguageId

Gets the associated language ID

getLanguageId(string langCode) : int
static
since

3.1

note

CmsHelper::getLanguage() is the preferred method.

Arguments

langCode

stringThe language code to look up

Response

intThe language ID

getRowData

Gets a row of data from a table

getRowData(\Joomla\CMS\Table\Table table) : array
since

3.1

Arguments

table

\Joomla\CMS\Table\TableTable instance for a row.

Response

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