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