Back to Joomla project (class list)

Class CategoryServiceTrait - list of methods

Trait for component categories service.
Package: Joomla\CMS\Categories
Copyright: (C) 2018 Open Source Matters, Inc.
License: GNU General Public License version 2 or later; see LICENSE
Located at: Joomla/Categories/CategoryServiceTrait.php
Project: Joomla

Method Summary

public \Joomla\CMS\Categories\CategoryInterface
(array $options = [], mixed $section = '')

Returns the category service.
Parameters
  • array $options The options
  • string $section The section
Returns
  • \Joomla\CMS\Categories\CategoryInterface
Since
  • 4.0.0
-
  • \Joomla\CMS\Categories\SectionNotFoundException
Show source code of this method: getCategory Source Code

public void
(\Joomla\CMS\Categories\CategoryFactoryInterface $categoryFactory)

Sets the internal category factory.
Parameters
  • \Joomla\CMS\Categories\CategoryFactoryInterface $categoryFactory The categories factory
Returns
  • void
Since
  • 4.0.0
Show source code of this method: setCategoryFactory Source Code

public void
(array $items, string $section)

Adds Count Items for Category Manager.
Parameters
  • \stdClass[] $items The category objects
  • string $section The section
Returns
  • void
Since
  • 4.0.0
-
  • \Exception
Show source code of this method: countItems Source Code

public void
(\Joomla\CMS\Form\Form $form, mixed $data)

Prepares the category form
Parameters
  • \Joomla\CMS\Form\Form $form The form to change
  • array|object $data The form data
Returns
  • void
Show source code of this method: prepareForm Source Code

protected string|null
(string $section = null)

Returns the table for the count items functions for the given section.
Parameters
  • string $section The section
Returns
  • string|null
Since
  • 4.0.0
Show source code of this method: getTableNameForSection Source Code

protected string|null
(string $section = null)

Returns the state column for the count items functions for the given section.
Parameters
  • string $section The section
Returns
  • string|null
Since
  • 4.0.0
Show source code of this method: getStateColumnForSection Source Code

Properties Summary

private \Joomla\CMS\Categories\CategoryFactoryInterface
$categoryFactory
The categories factory
Since
  • 4.0.0

Tags Summary

Since
4.0.0