⇦ Back to Feed classMethod removeEntry
public \Joomla\CMS\Feed\Feed
removeEntry
(\Joomla\CMS\Feed\FeedEntry $entry)
Method to remove an entry from the feed object.
Parameters
- \Joomla\CMS\Feed\FeedEntry $entry The entry object to remove.
Returns
Since
Method removeEntry - Source code
/**
* Method to remove an entry from the feed object.
*
* @param FeedEntry $entry The entry object to remove.
*
* @return Feed
*
* @since 3.1.4
*/
public function removeEntry(FeedEntry $entry)
{
// If the entry exists remove it.
foreach ($this->entries as $k => $e) {
if ($e == $entry) {
unset($this->entries[$k]);
$this->entries = array_values($this->entries);
return $this;
}
}
return $this;
}