X-Git-Url: http://aleph1.co.uk/gitweb/?a=blobdiff_plain;f=web%2Fcore%2Fmodules%2Ffilter%2Fsrc%2FEntity%2FFilterFormat.php;h=604ce01ac2f18028cbea4fcde8a735f58592179d;hb=9424afc6c1f518c301bf87a23c047d1873435d05;hp=9dbaa62fd2c21d341fd3df433a039b65511d9ef2;hpb=a2bd1bf0c2c1f1a17d188f4dc0726a45494cefae;p=yaffs-website diff --git a/web/core/modules/filter/src/Entity/FilterFormat.php b/web/core/modules/filter/src/Entity/FilterFormat.php index 9dbaa62fd..604ce01ac 100644 --- a/web/core/modules/filter/src/Entity/FilterFormat.php +++ b/web/core/modules/filter/src/Entity/FilterFormat.php @@ -16,6 +16,13 @@ use Drupal\filter\Plugin\FilterInterface; * @ConfigEntityType( * id = "filter_format", * label = @Translation("Text format"), + * label_collection = @Translation("Text formats"), + * label_singular = @Translation("text format"), + * label_plural = @Translation("text formats"), + * label_count = @PluralTranslation( + * singular = "@count text format", + * plural = "@count text formats", + * ), * handlers = { * "form" = { * "add" = "Drupal\filter\FilterFormatAddForm", @@ -269,7 +276,7 @@ class FilterFormat extends ConfigEntityBase implements FilterFormatInterface, En */ public function getHtmlRestrictions() { // Ignore filters that are disabled or don't have HTML restrictions. - $filters = array_filter($this->filters()->getAll(), function($filter) { + $filters = array_filter($this->filters()->getAll(), function ($filter) { if (!$filter->status) { return FALSE; } @@ -286,7 +293,7 @@ class FilterFormat extends ConfigEntityBase implements FilterFormatInterface, En // From the set of remaining filters (they were filtered by array_filter() // above), collect the list of tags and attributes that are allowed by all // filters, i.e. the intersection of all allowed tags and attributes. - $restrictions = array_reduce($filters, function($restrictions, $filter) { + $restrictions = array_reduce($filters, function ($restrictions, $filter) { $new_restrictions = $filter->getHTMLRestrictions(); // The first filter with HTML restrictions provides the initial set.