vbresults
Well-known member
library/Foo/Listener.php
library/Foo/ViewPublic/Forum/List.php
library/Foo/Listener.php
I have tried several permutations (switching parent : : prepareParams() and setParams, extending XenForo_View and XenForo_ViewPublic_Base) but none of them work.
PHP:
public static function loadClassView($class, array &$extend) {
if ($class == 'XenForo_ViewPublic_Forum_List') {
$extend[] = 'Foo_ViewPublic_Forum_List';
}
}
PHP:
class Foo_ViewPublic_Forum_List extends XFCP_Foo_ViewPublic_Forum_List {
public function prepareParams() {
parent::prepareParams();
$this->setParams(array('foo' => 'bar'));
}
}
PHP:
public static function templateHook($hookName, &$contents, array $hookParams, XenForo_Template_Abstract $template) {
$params = $template->getParams();
if ($hookName == 'page_container_sidebar') {
// Outputs string(29) "XenForo_ViewPublic_Forum_List", NULL
var_dump($params['viewName'], $params['foo']);
}
}
I have tried several permutations (switching parent : : prepareParams() and setParams, extending XenForo_View and XenForo_ViewPublic_Base) but none of them work.