Skip to content

Commit

Permalink
Add trigger to com_content category model
Browse files Browse the repository at this point in the history
  • Loading branch information
Arkadiy-Sedelnikov committed Oct 13, 2014
1 parent afad7da commit 8598f30
Showing 1 changed file with 6 additions and 0 deletions.
6 changes: 6 additions & 0 deletions components/com_content/models/category.php
Expand Up @@ -238,6 +238,12 @@ function getItems()
$model->setState('filter.subcategories', $this->getState('filter.subcategories'));
$model->setState('filter.max_category_levels', $this->getState('filter.max_category_levels'));
$model->setState('list.links', $this->getState('list.links'));

$dispatcher = JEventDispatcher::getInstance();
// Include the content plugins for the change of category state event
JPluginHelper::importPlugin('content');
// Trigger the onCategoryChangeState event
$dispatcher->trigger('onGetContentItems', array(&$model));

if ($limit >= 0)
{
Expand Down

0 comments on commit 8598f30

Please sign in to comment.