public static \Joomla\CMS\Menu\AbstractMenu
getInstance
(mixed $client, mixed $options = array())
/**
* Returns a Menu object
*
* @param string $client The name of the client
* @param array $options An associative array of options
*
* @return AbstractMenu A menu object.
*
* @since 1.5
*
* @throws \Exception
*
* @deprecated 5.0 Use the MenuFactoryInterface from the container instead
*/
public static function getInstance($client, $options = array())
{
if (!$client) {
throw new \Exception(Text::sprintf('JLIB_APPLICATION_ERROR_MENU_LOAD', $client), 500);
}
if (empty(self::$instances[$client])) {
self::$instances[$client] = Factory::getContainer()->get(MenuFactoryInterface::class)->createMenu($client, $options);
}
return self::$instances[$client];
}