⇦ Back to Feed classMethod addCategory
public \Joomla\CMS\Feed\Feed
addCategory
(mixed $name, mixed $uri = '')
Method to add a category to the feed object.
Parameters
- string $name The name of the category to add.
- string $uri The optional URI for the category to add.
Returns
Since
Method addCategory - Source code
/**
* Method to add a category to the feed object.
*
* @param string $name The name of the category to add.
* @param string $uri The optional URI for the category to add.
*
* @return Feed
*
* @since 3.1.4
*/
public function addCategory($name, $uri = '')
{
$this->properties['categories'][$name] = $uri;
return $this;
}