summaryrefslogtreecommitdiffstats
path: root/core/modules/node/src/Entity/Node.php
diff options
context:
space:
mode:
authorNathaniel Catchpole2017-06-15 13:02:05 +0100
committerNathaniel Catchpole2017-06-15 13:02:05 +0100
commitc53b32284783d9f3c188116b0985caa680cabc55 (patch)
tree09a86640b6c2f23eefd1cb9e8673e0656f1f2e61 /core/modules/node/src/Entity/Node.php
parent19854be65fea40920ea8a9c15f6e424e6ce0bcfb (diff)
Issue #2068063 by timmillwood, Berdir, tduong, Manuel Garcia, nlisgo, yongt9412, esod, lauriii, jonathan1055, vijaycs85, yoroy, amit.drupal, tkoleary, ifrik, Bojhan, xjm, tstoeckler, amateescu: Change "Save and keep un-/published" buttons to a "Published" checkbox and an included "Save" button
Diffstat (limited to 'core/modules/node/src/Entity/Node.php')
-rw-r--r--core/modules/node/src/Entity/Node.php10
1 files changed, 10 insertions, 0 deletions
diff --git a/core/modules/node/src/Entity/Node.php b/core/modules/node/src/Entity/Node.php
index 74a7c0b..e5544a2 100644
--- a/core/modules/node/src/Entity/Node.php
+++ b/core/modules/node/src/Entity/Node.php
@@ -340,6 +340,16 @@ class Node extends EditorialContentEntityBase implements NodeInterface {
])
->setDisplayConfigurable('form', TRUE);
+ $fields['status']
+ ->setDisplayOptions('form', [
+ 'type' => 'boolean_checkbox',
+ 'settings' => [
+ 'display_label' => TRUE,
+ ],
+ 'weight' => 120,
+ ])
+ ->setDisplayConfigurable('form', TRUE);
+
$fields['created'] = BaseFieldDefinition::create('created')
->setLabel(t('Authored on'))
->setDescription(t('The time that the node was created.'))