Skip to content
Snippets Groups Projects
Commit 4c840402 authored by Paul Mrvik's avatar Paul Mrvik
Browse files

Issue #3494911 by globexplorer: Remnove machine name column and change text when no record exists

parent dfc01baa
No related branches found
No related tags found
No related merge requests found
......@@ -66,7 +66,7 @@ final class ConditionalNotificationListBuilder extends ConfigEntityListBuilder {
*/
public function buildHeader(): array {
$header['label'] = $this->t('Notifictation template');
$header['id'] = $this->t('Machine name');
//$header['id'] = $this->t('Machine name');
$header['status'] = $this->t('Status');
return $header + parent::buildHeader();
}
......@@ -77,7 +77,7 @@ final class ConditionalNotificationListBuilder extends ConfigEntityListBuilder {
public function buildRow(EntityInterface $entity): array {
/** @var \Drupal\conditional_notification\ConditionalNotificationInterface $entity */
$row['label'] = $entity->label();
$row['id'] = $entity->id();
//$row['id'] = $entity->id();
$row['status'] = $entity->status() ? $this->t('Enabled') : $this->t('Disabled');
return $row + parent::buildRow($entity);
}
......
......@@ -129,6 +129,10 @@ final class ConditionalNotificationController extends ControllerBase {
$build['content'] = \Drupal::entityTypeManager()->getListBuilder('conditional_notification')->render();
if (isset($build['content']['table']['#empty'])) {
$build['content']['table']['#empty'] = $this->t('No conditional notifications exists yet!');
}
return $build;
......
0% Loading or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment