mirror of
https://github.com/phpbb/phpbb.git
synced 2025-07-31 14:00:31 +02:00
[feature/migrations] getLocalisedMessage function for migration exception
PHPBB3-11351
This commit is contained in:
@@ -62,4 +62,18 @@ class phpbb_db_migration_exception extends \Exception
|
|||||||
{
|
{
|
||||||
return $this->parameters;
|
return $this->parameters;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
/**
|
||||||
|
* Get localised message (with $user->lang())
|
||||||
|
*
|
||||||
|
* @param phpbb_user $user
|
||||||
|
* @return string
|
||||||
|
*/
|
||||||
|
public function getLocalisedMessage(phpbb_user $user)
|
||||||
|
{
|
||||||
|
$parameters = $this->getParameters();
|
||||||
|
array_unshift($parameters, $this->getMessage());
|
||||||
|
|
||||||
|
return call_user_func_array(array($user, 'lang'), $parameters);
|
||||||
|
}
|
||||||
}
|
}
|
||||||
|
Reference in New Issue
Block a user