LegacyComponent

Implements ComponentInterface, MVCFactoryServiceInterface, CategoryServiceInterface, FieldsServiceInterface, RouterServiceInterface, TagServiceInterface

Access to component specific services.

since

4.0.0

package

Joomla CMS

Methods

__construct

LegacyComponentContainer constructor.

__construct( component) : 
since

4.0.0

Arguments

component

stringThe component

Response

mixed

countItems

Adds Count Items for Category Manager.

countItems(\stdClass||string|int items,  section) : 
since

4.0.0

throws

Exception

Arguments

items

array<string|int, stdClass>The category objects

section

stringThe section

Response

void

countTagItems

Adds Count Items for Tag Manager.

countTagItems(\stdClass||string|int items,  extension) : 
since

4.0.0

throws

Exception

Arguments

items

array<string|int, stdClass>The content objects

extension

stringThe name of the active view.

Response

void

createRouter

Returns the router.

createRouter(\Joomla\CMS\Application\CMSApplicationInterface application, \Joomla\CMS\Menu\AbstractMenu menu) : \Joomla\CMS\Component\Router\RouterInterface
since

4.0.0

Arguments

application

CMSApplicationInterfaceThe application object

menu

AbstractMenuThe menu object to work with

Response

RouterInterface

getCategory

Returns the category service.

getCategory(mixed||string|int options = [],  section = '') : \Joomla\CMS\Categories\CategoryInterface
since

4.0.0

throws

SectionNotFoundException

Arguments

options

array<string|int, mixed>The options

section

stringThe section

Response

CategoryInterface

getContexts

Returns valid contexts.

getContexts() : mixed||string|int
since

4.0.0

Response

array<string|int, mixed>

getDispatcher

Returns the dispatcher for the given application.

getDispatcher(\Joomla\CMS\Application\CMSApplicationInterface application) : \Joomla\CMS\Dispatcher\DispatcherInterface
since

4.0.0

Arguments

application

CMSApplicationInterfaceThe application

Response

DispatcherInterface

getMVCFactory

Get the factory.

getMVCFactory() : \Joomla\CMS\MVC\Factory\MVCFactoryInterface
since

4.0.0

throws

UnexpectedValueExceptionMay be thrown if the factory has not been set.

Response

MVCFactoryInterface

getStateColumnForSection

Returns the state column for the count items functions for the given section.

getStateColumnForSection( section = null) : string|null
inherited
since

4.0.0

Arguments

section

stringThe section

Response

string|null

getTableNameForSection

Returns the table for the count items functions for the given section.

getTableNameForSection( section = null) : string|null
inherited
since

4.0.0

Arguments

section

stringThe section

Response

string|null

loadHelper

Returns the classname of the legacy helper class. If none is found it returns false.

loadHelper() : bool|string
since

4.0.0

Response

bool|string

prepareForm

Prepares the category form

prepareForm(\Joomla\CMS\Form\Form form, array|object data) : 
inherited

Arguments

form

FormThe form to change

data

array<string|int, mixed>|objectThe form data

Response

void

setCategoryFactory

Sets the internal category factory.

setCategoryFactory(\Joomla\CMS\Categories\CategoryFactoryInterface categoryFactory) : 
inherited
since

4.0.0

Arguments

categoryFactory

CategoryFactoryInterfaceThe categories factory

Response

void

validateSection

Returns a valid section for articles. If it is not valid then null is returned.

validateSection( section,  item = null) : string|null
since

4.0.0

Arguments

section

stringThe section to get the mapping for

item

objectThe item

Response

string|nullThe new section

Properties

categoryFactory

The categories factory

inherited
since

4.0.0

Type(s)

CategoryFactoryInterface

component

since

4.0.0

Type(s)

string