Is it possible to hook into Dependencies?

Jaxel

Well-known member
I would like to hook into "XenForo_Dependencies_Public" and replace the existing "_getNavigationContainerParams" or "getEffectiveContainerParams".

Is something like this possible? How would I do it?

Basically I would like to do something along the lines of:

Code:
    public function getEffectiveContainerParams()
    {
        $response = parent::getEffectiveContainerParams();
       
        unset($response->params['tabs']['members'])
 
        return $response;
    }
 
The event "container_public_params" is fired in XenForo_Dependencies_Public

I've just tested and this works:

PHP:
<?php
class RemoveMembersTab_Listener
{
	public static function unsetTab(array &$params, XenForo_Dependencies_Abstract $dependencies)
	{
		unset($params['tabs']['members']);
	}
}
 
Back
Top Bottom