How are phrases for permissions fetched?


Well-known member
Some Permission phrases like permission_general_view aren't in admin templates although they are clearly there in the html output. And they can't be found in any core files either. The html for them is this:
<tr class="permission">
$permission.title is a variable for phrases. I have searched the core files for $permission.title. No results besides a few in the admin_templates.xml file of the install directory. So this begs the question how those phrases are fetched, or more specifically, how does $permission.title work?


in memoriam 1991-2020
You would really want to look for $permission['title'] or the specific Controller actions for those templates you found to see how $permission is populated.


Well-known member
Phrase titles for adminnavigation, cronjobs, options, user permissions, style properties, thread prefixes, trophies, userfields and warnings are generated by the model

e.g. for the admin permission, you'll want to check the XenForo_Model_Permission

ppublic function prepareAdminPermission(array $permission)
$permission['title'] = new XenForo_Phrase($this->getAdminPermissionTitlePhraseName(
return $permission;