return $header + parent::
buildHeader();
} /**
* {@inheritdoc}
*/
public function buildRow(EntityInterface
$entity) { // Check whether this is the fallback text format. This format is available
// to all roles and cannot be disabled via the admin interface.
$row['label'
] =
$entity->
label();
$row['roles'
] =
[];
if ($entity->
isFallbackFormat()) { $fallback_choice =
$this->configFactory->
get('filter.settings'
)->
get('always_show_fallback_choice'
);
if ($fallback_choice) { $row['roles'
]['#markup'
] =
$this->
t('All roles may use this format'
);
} else { $row['roles'
]['#markup'
] =
$this->
t('This format is shown when no other formats are available'
);
} // Emphasize the fallback role text since it is important to understand
// how it works which configuring filter formats. Additionally, it is not
// a list of roles unlike the other values in this column.
$row['roles'
]['#prefix'
] = '<em>';