Render entity labels using h6 tag
This commit is contained in:
parent
6be3e3639c
commit
1b6b46ab9a
|
@ -74,13 +74,15 @@ class FarmMetricsBlock extends BlockBase implements ContainerFactoryPluginInterf
|
||||||
|
|
||||||
// Create a container for asset metrics.
|
// Create a container for asset metrics.
|
||||||
$assets_label = $this->entityTypeManager->getStorage('asset')->getEntityType()->getCollectionLabel();
|
$assets_label = $this->entityTypeManager->getStorage('asset')->getEntityType()->getCollectionLabel();
|
||||||
$output['asset'] = [
|
$output['asset']['label'] = [
|
||||||
'#markup' => '<strong>' . Link::createFromRoute($assets_label, 'view.farm_asset.page')->toString() . ' (' . $this->t('active') . ')</strong>',
|
'#type' => 'html_tag',
|
||||||
'metrics' => [
|
'#tag' => 'h6',
|
||||||
'#type' => 'container',
|
'#value' => Link::createFromRoute($assets_label, 'view.farm_asset.page')->toString() . ' (' . $this->t('active') . ')',
|
||||||
'#attributes' => [
|
];
|
||||||
'class' => 'assets metrics-container',
|
$output['asset']['metrics'] = [
|
||||||
],
|
'#type' => 'container',
|
||||||
|
'#attributes' => [
|
||||||
|
'class' => 'assets metrics-container',
|
||||||
],
|
],
|
||||||
];
|
];
|
||||||
$metrics = $this->getEntityMetrics('asset');
|
$metrics = $this->getEntityMetrics('asset');
|
||||||
|
@ -97,13 +99,15 @@ class FarmMetricsBlock extends BlockBase implements ContainerFactoryPluginInterf
|
||||||
|
|
||||||
// Create a section for log metrics.
|
// Create a section for log metrics.
|
||||||
$logs_label = $this->entityTypeManager->getStorage('log')->getEntityType()->getCollectionLabel();
|
$logs_label = $this->entityTypeManager->getStorage('log')->getEntityType()->getCollectionLabel();
|
||||||
$output['log'] = [
|
$output['log']['label'] = [
|
||||||
'#markup' => '<strong>' . Link::createFromRoute($logs_label, 'view.farm_log.page')->toString() . '</strong>',
|
'#type' => 'html_tag',
|
||||||
'metrics' => [
|
'#tag' => 'h6',
|
||||||
'#type' => 'container',
|
'#value' => Link::createFromRoute($logs_label, 'view.farm_log.page')->toString(),
|
||||||
'#attributes' => [
|
];
|
||||||
'class' => 'logs metrics-container',
|
$output['log']['metrics'] = [
|
||||||
],
|
'#type' => 'container',
|
||||||
|
'#attributes' => [
|
||||||
|
'class' => 'logs metrics-container',
|
||||||
],
|
],
|
||||||
];
|
];
|
||||||
$metrics = $this->getEntityMetrics('log');
|
$metrics = $this->getEntityMetrics('log');
|
||||||
|
|
Loading…
Reference in New Issue