function filter_permission_name
Returns the machine-readable permission name for a provided text format.
Parameters
$format: An object representing a text format.
Return value
The machine-readable permission name, or FALSE if the provided text format is malformed or is the fallback format (which is available to all users).
15 calls to filter_permission_name()
- BlockTestCase::setUp in modules/
block/ block.test - Sets up a Drupal site for running functional and integration tests.
- FilterAdminTestCase::setUp in modules/
filter/ filter.test - Sets up a Drupal site for running functional and integration tests.
- FilterDefaultFormatTestCase::testDefaultTextFormats in modules/
filter/ filter.test - Tests if the default text format is accessible to users.
- FilterFormatAccessTestCase::setUp in modules/
filter/ filter.test - Sets up a Drupal site for running functional and integration tests.
- FilterFormatAccessTestCase::testFormatPermissions in modules/
filter/ filter.test - Tests the Filter format access permissions functionality.
File
-
modules/
filter/ filter.module, line 380
Code
function filter_permission_name($format) {
if (isset($format->format) && $format->format != filter_fallback_format()) {
return 'use text format ' . $format->format;
}
return FALSE;
}
Buggy or inaccurate documentation? Please file an issue. Need support? Need help programming? Connect with the Drupal community.