function FilterFormatRepositoryInterface::getFormatsByRole

Same name and namespace in other branches
  1. main core/modules/filter/src/FilterFormatRepositoryInterface.php \Drupal\filter\FilterFormatRepositoryInterface::getFormatsByRole()

Returns a list of text formats that are allowed for a given role.

Parameters

string $roleId: The role identifier.

Return value

array<string, \Drupal\filter\FilterFormatInterface> An array of text format objects that are allowed for the role, keyed by the text format ID and ordered by weight.

File

core/modules/filter/src/FilterFormatRepositoryInterface.php, line 45

Class

FilterFormatRepositoryInterface
Provides an interface for a repository for filter formats.

Namespace

Drupal\filter

Code

public function getFormatsByRole(string $roleId) : array;

Buggy or inaccurate documentation? Please file an issue. Need support? Need help programming? Connect with the Drupal community.