Reply to thread

I worked around it this way


[php]

MyAddOn_ControllerPublic_Forum extends XFCP_MyAddOn_ControllerPublic_Forum {

public function actionIndex() {

$GLOBALS['MyAddOn_ControllerPublic_Forum'] = $this;

return parent::actionIndex();

}


public function MyAddOn_actionIndex(MyAddOn_Model_Forum $forumModel, array $conditions, array &$fetchOptions)

{

// do something

}

}

[/php]


[php]

MyAddOn_Model_Forum extends XFCP_MyAddOn_Model_Forum {

public function getForums(array $conditions = array(), array $fetchOptions = array())

{

if (!empty($GLOBALS['MyAddOn_ControllerPublic_Forum'])) {

$GLOBALS['MyAddOn_ControllerPublic_Forum']->MyAddOn_actionIndex($this, $conditions, $fetchOptions);

}

return parent::getForums($conditions, $fetchOptions);

}

}

[/php]


Hope this helps :)


Back
Top Bottom