function FilterFormat::getPermissionName
Same name and namespace in other branches
- 10 core/modules/filter/src/Entity/FilterFormat.php \Drupal\filter\Entity\FilterFormat::getPermissionName()
- 9 core/modules/filter/src/Entity/FilterFormat.php \Drupal\filter\Entity\FilterFormat::getPermissionName()
- 8.9.x core/modules/filter/src/Entity/FilterFormat.php \Drupal\filter\Entity\FilterFormat::getPermissionName()
- main core/modules/filter/src/Entity/FilterFormat.php \Drupal\filter\Entity\FilterFormat::getPermissionName()
Returns the machine-readable permission name for the text format.
Return value
string|false The machine-readable permission name, or FALSE if the text format is malformed or is the fallback format (which is available to all users).
Overrides FilterFormatInterface::getPermissionName
2 calls to FilterFormat::getPermissionName()
- FilterFormat::getRoles in core/
modules/ filter/ src/ Entity/ FilterFormat.php - Retrieves a list of roles that are allowed to use this format.
- FilterFormat::postSave in core/
modules/ filter/ src/ Entity/ FilterFormat.php - Acts on a saved entity before the insert or update hook is invoked.
File
-
core/
modules/ filter/ src/ Entity/ FilterFormat.php, line 268
Class
- FilterFormat
- Represents a text format.
Namespace
Drupal\filter\EntityCode
public function getPermissionName() {
return !$this->isFallbackFormat() ? 'use text format ' . $this->id() : FALSE;
}
Buggy or inaccurate documentation? Please file an issue. Need support? Need help programming? Connect with the Drupal community.