public function ContentFieldCount::getResultInfo in Site Audit 8.3
.
Overrides SiteAuditCheckBase::getResultInfo
File
- src/
Plugin/ SiteAuditCheck/ ContentFieldCount.php, line 30
Class
- ContentFieldCount
- Provides the ContentFieldCount Check.
Namespace
Drupal\site_audit\Plugin\SiteAuditCheckCode
public function getResultInfo() {
$table_rows = [];
foreach ($this->registry->fields as $field_name => $type) {
$table_rows[] = [
$field_name,
$type,
];
}
$header = [
$this
->t('Name'),
$this
->t('Type'),
];
return [
'#theme' => 'table',
'#class' => 'table-condensed',
'#header' => $header,
'#rows' => $table_rows,
'#title' => $this
->t('There are @count total fields.', [
'@count' => count($this->registry->fields),
]),
];
}