Skip to content

Commit

Permalink
Add layout to category Associations helper
Browse files Browse the repository at this point in the history
  • Loading branch information
Septdir committed Apr 23, 2018
1 parent 6f6eced commit 7f78d60
Showing 1 changed file with 4 additions and 3 deletions.
Expand Up @@ -25,12 +25,13 @@ abstract class CategoryHelperAssociation
*
* @param integer $id Id of the item
* @param string $extension Name of the component
* @param string $layout Category layout
*
* @return array Array of associations for the component categories
*
* @since 3.0
*/
public static function getCategoryAssociations($id = 0, $extension = 'com_content')
public static function getCategoryAssociations($id = 0, $extension = 'com_content', $layout = null)
{
$return = array();

Expand All @@ -46,11 +47,11 @@ public static function getCategoryAssociations($id = 0, $extension = 'com_conten
{
if (class_exists($helperClassname) && is_callable(array($helperClassname, 'getCategoryRoute')))
{
$return[$tag] = $helperClassname::getCategoryRoute($item, $tag);
$return[$tag] = $helperClassname::getCategoryRoute($item, $tag, $layout);
}
else
{
$return[$tag] = 'index.php?option=' . $extension . '&view=category&id=' . $item;
$return[$tag] = 'index.php?option=' . $extension . '&view=category&id=' . $item . '&layout=' . $layout;
}
}
}
Expand Down

0 comments on commit 7f78d60

Please sign in to comment.