public static function getMenu(string $name, array $user, bool $fullBaseUrl = false, $context = null): MenuInterface
    {
        $instance = new self($user, $fullBaseUrl);

        return $instance->getMenuByName($name, $context);
    }
public static function getMenu(string $name, array $user, bool $fullBaseUrl = false, $context = null): MenuInterface
    {
        $instance = new self($user, $fullBaseUrl);

        return $instance->getMenuByName($name, $context);
    }
public static function getMenu ( string $ name , array $ user , bool $ fullBaseUrl = false , $ context = null ) : MenuInterface { $ instance = new self ( $ user , $ fullBaseUrl ) ; return $ instance -> getMenuByName ( $ name , $ context ) ; }
Returns a menu instance based on the provided name.
If the name was found in database, it is checked whether the default option is enabled
If was found and the default option is disabled, the instance is constructed through events
Otherwise, the menu instance is constructed base on the menu settings defined in database

@param string $name Menu name
@param mixed[] $user User info
@param bool $fullBaseUrl Full-base URL flag
@param mixed $context The object that generates the menu to be used as the event subject
@return \Menu\MenuBuilder\MenuInterface
Returns a menu instance based on the provided name . If the name was found in database it is checked whether the default option is enabled If was found and the default option is disabled the instance is constructed through events Otherwise the menu instance is constructed base on the menu settings defined in database