public function FilterFormat::getPermissionName in Drupal 10
Same name and namespace in other branches
- 8 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()
Returns the machine-readable permission name for the text format.
Return value
string|bool 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
1 call to FilterFormat::getPermissionName()
- 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 255
Class
- FilterFormat
- Represents a text format.
Namespace
Drupal\filter\EntityCode
public function getPermissionName() {
return !$this
->isFallbackFormat() ? 'use text format ' . $this
->id() : FALSE;
}