Back to Feed class

Method reverseItems

public \Joomla\CMS\Feed\Feed
reverseItems
()
Method to reverse the items if display is set to 'oldest first'
Returns
  • \Joomla\CMS\Feed\Feed
Since
  • 3.1.4
Class: Feed
Project: Joomla

Method reverseItems - Source code

/**
 * Method to reverse the items if display is set to 'oldest first'
 *
 * @return  Feed
 *
 * @since   3.1.4
 */
public function reverseItems()
{
    if (\is_array($this->entries) && !empty($this->entries)) {
        $this->entries = array_reverse($this->entries);
    }
    return $this;
}