- $is_new = !$node->isNew() ? format_date($node->getChangedTime(), 'short') : t('Not saved yet');
- $form['meta'] = [
- '#attributes' => ['class' => ['entity-meta__header']],
- '#type' => 'container',
- '#group' => 'advanced',
- '#weight' => -100,
- 'published' => [
- '#type' => 'html_tag',
- '#tag' => 'h3',
- '#value' => $node->isPublished() ? t('Published') : t('Not published'),
- '#access' => !$node->isNew(),
- '#attributes' => [
- 'class' => ['entity-meta__title'],
- ],
- ],
- 'changed' => [
- '#type' => 'item',
- '#wrapper_attributes' => ['class' => ['entity-meta__last-saved', 'container-inline']],
- '#markup' => '<h4 class="label inline">' . t('Last saved') . '</h4> ' . $is_new,
- ],
- 'author' => [
- '#type' => 'item',
- '#wrapper_attributes' => ['class' => ['author', 'container-inline']],
- '#markup' => '<h4 class="label inline">' . t('Author') . '</h4> ' . $node->getOwner()->getUsername(),
- ],
- ];
+ $form['meta']['#type'] = 'container';
+ $form['meta']['#access'] = TRUE;
+ $form['meta']['changed']['#wrapper_attributes']['class'][] = 'container-inline';
+ $form['meta']['author']['#wrapper_attributes']['class'][] = 'container-inline';
+