mirror of
https://github.com/phpbb/phpbb.git
synced 2025-06-28 14:18:52 +00:00
[feature/migrations] getLocalisedMessage function for migration exception
PHPBB3-11351
This commit is contained in:
parent
f9a1b27a99
commit
f6bb14569b
1 changed files with 14 additions and 0 deletions
|
@ -62,4 +62,18 @@ class phpbb_db_migration_exception extends \Exception
|
|||
{
|
||||
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);
|
||||
}
|
||||
}
|
||||
|
|
Loading…
Add table
Reference in a new issue