Category entity

Phproberto\Joomla\Entity\Content\Category

Represents a com_content category.

Index

Usage

To start using this entity you have to load the phproberto_entity library and add the use statement like:

\JLoader::import('phproberto_entity.library');

use Phproberto\Joomla\Entity\Content\Category;

// Load the category with id = 1
$category = Category::instance(1);

// Show category stuff
echo $category->get('title') . '<br />';

// Retrieve articles in this category
foreach ($category->getArticles() as $article)
{
	echo $article->id() . '. ' . $article->get('title');
}

Methods

Extends

This class extends another class so you can also use methods defined there:

Phproberto\Joomla\Entity\Categories\Category

Traits

This class allows you to use methods defined in these traits: