• This site uses cookies. By continuing to use this site, you are agreeing to our use of cookies. Learn more.

Is it possible to hook into Dependencies?

Jaxel

Well-known member
#1
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;
    }
 

Chris D

XenForo developer
Staff member
#2
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']);
	}
}