diff --git a/core/modules/field_ui/src/Tests/ManageDisplayTest.php b/core/modules/field_ui/src/Tests/ManageDisplayTest.php index 81b8e1b..e7c2d88 100644 --- a/core/modules/field_ui/src/Tests/ManageDisplayTest.php +++ b/core/modules/field_ui/src/Tests/ManageDisplayTest.php @@ -361,12 +361,10 @@ function testSingleViewMode() { */ function testNoFieldsDisplayOverview() { // Create a fresh content type without any fields. - $this->drupalCreateContentType(array( + entity_create('node_type', array( 'type' => 'no_fields', 'name' => 'No fields', - 'create_body' => FALSE, - )); - + ))->save(); $this->drupalGet('admin/structure/types/manage/no_fields/display'); $this->assertRaw(t('There are no fields yet added. You can add new fields on the Manage fields page.', array('@link' => url('admin/structure/types/manage/no_fields/fields')))); } diff --git a/core/modules/node/src/Entity/NodeType.php b/core/modules/node/src/Entity/NodeType.php index 1931c75..e282246 100644 --- a/core/modules/node/src/Entity/NodeType.php +++ b/core/modules/node/src/Entity/NodeType.php @@ -84,28 +84,6 @@ class NodeType extends ConfigEntityBundleBase implements NodeTypeInterface { public $title_label = 'Title'; /** - * Indicates whether a Body field should be created for this node type. - * - * This property affects entity creation only. It allows default configuration - * of modules and installation profiles to specify whether a Body field should - * be created for this bundle. - * - * @var bool - * - * @see \Drupal\node\Entity\NodeType::$create_body_label - */ - protected $create_body = TRUE; - - /** - * The label to use for the Body field upon entity creation. - * - * @see \Drupal\node\Entity\NodeType::$create_body - * - * @var string - */ - protected $create_body_label = 'Body'; - - /** * Module-specific settings for this node type, keyed by module name. * * @var array diff --git a/core/modules/node/src/NodeTypeForm.php b/core/modules/node/src/NodeTypeForm.php index a529c85..760eea5 100644 --- a/core/modules/node/src/NodeTypeForm.php +++ b/core/modules/node/src/NodeTypeForm.php @@ -192,11 +192,7 @@ public function save(array $form, FormStateInterface $form_state) { drupal_set_message(t('The content type %name has been added.', $t_args)); $context = array_merge($t_args, array('link' => l(t('View'), 'admin/structure/types'))); $this->logger('node')->notice('Added content type %name.', $context); - // Create a body if the create_body property is true - if ($type->get('create_body')) { - $label = $type->get('create_body_label'); - node_add_body_field($type, $label); - } + node_add_body_field($type, 'Body'); } $form_state->setRedirect('node.overview_types'); diff --git a/core/modules/simpletest/src/WebTestBase.php b/core/modules/simpletest/src/WebTestBase.php index 6d9b533..39dd33a 100644 --- a/core/modules/simpletest/src/WebTestBase.php +++ b/core/modules/simpletest/src/WebTestBase.php @@ -308,8 +308,7 @@ protected function drupalCreateContentType(array $values = array()) { $type = entity_create('node_type', $values); $status = $type->save(); // Add the body field as the form does. - $label = $type->get('create_body_label'); - node_add_body_field($type, $label); + node_add_body_field($type, 'Body'); \Drupal::service('router.builder')->rebuild(); $this->assertEqual($status, SAVED_NEW, String::format('Created content type %type.', array('%type' => $type->id())));