diff --git a/core/lib/Drupal/Core/Entity/ContentEntityDatabaseStorage.php b/core/lib/Drupal/Core/Entity/ContentEntityDatabaseStorage.php index 6b7de03..7432e87 100644 --- a/core/lib/Drupal/Core/Entity/ContentEntityDatabaseStorage.php +++ b/core/lib/Drupal/Core/Entity/ContentEntityDatabaseStorage.php @@ -455,7 +455,7 @@ protected function postLoad(array &$queried_entities) { $queried_entities = $this->mapFromStorageRecords($queried_entities); // Attach field values. - if ($this->entityType->isFieldable()) { + if ($this->entityType->isExtendable()) { $this->loadFieldItems($queried_entities); } diff --git a/core/lib/Drupal/Core/Entity/EntityType.php b/core/lib/Drupal/Core/Entity/EntityType.php index 93f6062..ede279a 100644 --- a/core/lib/Drupal/Core/Entity/EntityType.php +++ b/core/lib/Drupal/Core/Entity/EntityType.php @@ -87,11 +87,11 @@ class EntityType implements EntityTypeInterface { protected $permission_granularity; /** - * Indicates whether fields can be attached to entities of this type. + * Indicates whether fields can be extendable. * * @var bool (optional) */ - protected $fieldable; + protected $extendable; /** * Link templates using the URI template syntax. @@ -438,8 +438,8 @@ public function getPermissionGranularity() { /** * {@inheritdoc} */ - public function isFieldable() { - return isset($this->fieldable) ? $this->fieldable : FALSE; + public function isExtendable() { + return isset($this->extendable) ? $this->extendable : FALSE; } /** diff --git a/core/lib/Drupal/Core/Entity/EntityTypeInterface.php b/core/lib/Drupal/Core/Entity/EntityTypeInterface.php index 17d9555..218fe22 100644 --- a/core/lib/Drupal/Core/Entity/EntityTypeInterface.php +++ b/core/lib/Drupal/Core/Entity/EntityTypeInterface.php @@ -378,9 +378,9 @@ public function getPermissionGranularity(); * Indicates whether fields can be attached to entities of this type. * * @return bool - * Returns TRUE if the entity type can has fields, otherwise FALSE. + * Returns TRUE if the entity can extendable, otherwise FALSE. */ - public function isFieldable(); + public function isExtendable(); /** * Returns link templates using the URI template syntax. diff --git a/core/modules/aggregator/lib/Drupal/aggregator/Entity/Feed.php b/core/modules/aggregator/lib/Drupal/aggregator/Entity/Feed.php index ff93c30..ce8e62d 100644 --- a/core/modules/aggregator/lib/Drupal/aggregator/Entity/Feed.php +++ b/core/modules/aggregator/lib/Drupal/aggregator/Entity/Feed.php @@ -35,7 +35,7 @@ * "delete-form" = "aggregator.feed_delete", * }, * base_table = "aggregator_feed", - * fieldable = TRUE, + * extendable = TRUE, * entity_keys = { * "id" = "fid", * "label" = "title", diff --git a/core/modules/aggregator/lib/Drupal/aggregator/Entity/Item.php b/core/modules/aggregator/lib/Drupal/aggregator/Entity/Item.php index f12ed40..e6a053b 100644 --- a/core/modules/aggregator/lib/Drupal/aggregator/Entity/Item.php +++ b/core/modules/aggregator/lib/Drupal/aggregator/Entity/Item.php @@ -24,7 +24,7 @@ * "view_builder" = "Drupal\aggregator\ItemViewBuilder" * }, * base_table = "aggregator_item", - * fieldable = TRUE, + * extendable = TRUE, * entity_keys = { * "id" = "iid", * "label" = "title", diff --git a/core/modules/block/custom_block/lib/Drupal/custom_block/Entity/CustomBlock.php b/core/modules/block/custom_block/lib/Drupal/custom_block/Entity/CustomBlock.php index 421e3b5..913a013 100644 --- a/core/modules/block/custom_block/lib/Drupal/custom_block/Entity/CustomBlock.php +++ b/core/modules/block/custom_block/lib/Drupal/custom_block/Entity/CustomBlock.php @@ -41,7 +41,7 @@ * "edit-form" = "custom_block.edit", * "admin-form" = "custom_block.type_edit" * }, - * fieldable = TRUE, + * extendable = TRUE, * translatable = TRUE, * entity_keys = { * "id" = "id", diff --git a/core/modules/block/lib/Drupal/block/Entity/Block.php b/core/modules/block/lib/Drupal/block/Entity/Block.php index 9e17171..b9b845c 100644 --- a/core/modules/block/lib/Drupal/block/Entity/Block.php +++ b/core/modules/block/lib/Drupal/block/Entity/Block.php @@ -31,7 +31,7 @@ * } * }, * admin_permission = "administer blocks", - * fieldable = FALSE, + * extendable = FALSE, * entity_keys = { * "id" = "id", * "label" = "label" diff --git a/core/modules/comment/comment.module b/core/modules/comment/comment.module index c3b4981..c26c9fb 100644 --- a/core/modules/comment/comment.module +++ b/core/modules/comment/comment.module @@ -890,7 +890,7 @@ function comment_entity_predelete(EntityInterface $entity) { // mismatched types. So, we need to verify that the ID is numeric (even for an // entity type that has an integer ID, $entity->id() might be a string // containing a number), and then cast it to an integer when querying. - if ($entity->getEntityType()->isFieldable() && is_numeric($entity->id())) { + if ($entity->getEntityType()->isExtendable() && is_numeric($entity->id())) { $cids = db_select('comment', 'c') ->fields('c', array('cid')) ->condition('entity_id', (int) $entity->id()) diff --git a/core/modules/comment/comment.views.inc b/core/modules/comment/comment.views.inc index 6429f28..e14731e 100644 --- a/core/modules/comment/comment.views.inc +++ b/core/modules/comment/comment.views.inc @@ -353,7 +353,7 @@ function comment_views_data() { // Provide a relationship for each entity type except comment. foreach ($entities_types as $type => $entity_type) { - if ($type == 'comment' || !$entity_type->isFieldable() || !$entity_type->getBaseTable()) { + if ($type == 'comment' || !$entity_type->isExtendable() || !$entity_type->getBaseTable()) { continue; } if ($fields = \Drupal::service('comment.manager')->getFields($type)) { @@ -432,7 +432,7 @@ function comment_views_data() { // Provide a relationship for each entity type except comment. foreach ($entities_types as $type => $entity_type) { - if ($type == 'comment' || !$entity_type->isFieldable() || !$entity_type->getBaseTable()) { + if ($type == 'comment' || !$entity_type->isExtendable() || !$entity_type->getBaseTable()) { continue; } // This relationship does not use the 'field id' column, if the entity has @@ -604,7 +604,7 @@ function comment_views_data_alter(&$data) { // Provide a integration for each entity type except comment. foreach (\Drupal::entityManager()->getDefinitions() as $entity_type_id => $entity_type) { - if ($entity_type_id == 'comment' || !$entity_type->isFieldable() || !$entity_type->getBaseTable()) { + if ($entity_type_id == 'comment' || !$entity_type->isExtendable() || !$entity_type->getBaseTable()) { continue; } $fields = \Drupal::service('comment.manager')->getFields($entity_type_id); diff --git a/core/modules/comment/lib/Drupal/comment/Entity/Comment.php b/core/modules/comment/lib/Drupal/comment/Entity/Comment.php index 82a3dab..aa1210c 100644 --- a/core/modules/comment/lib/Drupal/comment/Entity/Comment.php +++ b/core/modules/comment/lib/Drupal/comment/Entity/Comment.php @@ -36,7 +36,7 @@ * }, * base_table = "comment", * uri_callback = "comment_uri", - * fieldable = TRUE, + * extendable = TRUE, * translatable = TRUE, * entity_keys = { * "id" = "cid", diff --git a/core/modules/config_translation/config_translation.api.php b/core/modules/config_translation/config_translation.api.php index a7db185..a840a8f 100644 --- a/core/modules/config_translation/config_translation.api.php +++ b/core/modules/config_translation/config_translation.api.php @@ -38,7 +38,7 @@ function hook_config_translation_info(&$info) { // If field UI is not enabled, the base routes of the type // "field_ui.instance_edit_$entity_type" are not defined. if (\Drupal::moduleHandler()->moduleExists('field_ui')) { - // Add fields entity mappers to all fieldable entity types defined. + // Add fields entity mappers to all extendable entity types defined. foreach ($entity_manager->getDefinitions() as $entity_type_id => $entity_type) { $base_route = NULL; try { @@ -48,8 +48,8 @@ function hook_config_translation_info(&$info) { // Ignore non-existent routes. } - // Make sure entity type is fieldable and has a base route. - if ($entity_type->isFieldable() && !empty($base_route)) { + // Make sure entity type is extendable and has a base route. + if ($entity_type->isExtendable() && !empty($base_route)) { $info[$entity_type_id . '_fields'] = array( 'base_route_name' => 'field_ui.instance_edit_' . $entity_type_id, 'entity_type' => 'field_instance_config', diff --git a/core/modules/config_translation/config_translation.module b/core/modules/config_translation/config_translation.module index 0db169e..a11f3b0 100644 --- a/core/modules/config_translation/config_translation.module +++ b/core/modules/config_translation/config_translation.module @@ -92,7 +92,7 @@ function config_translation_config_translation_info(&$info) { // If field UI is not enabled, the base routes of the type // "field_ui.instance_edit_$entity_type" are not defined. if (\Drupal::moduleHandler()->moduleExists('field_ui')) { - // Add fields entity mappers to all fieldable entity types defined. + // Add fields entity mappers to all extendable entity types defined. foreach ($entity_manager->getDefinitions() as $entity_type_id => $entity_type) { $base_route = NULL; try { @@ -102,8 +102,8 @@ function config_translation_config_translation_info(&$info) { // Ignore non-existent routes. } - // Make sure entity type is fieldable and has a base route. - if ($entity_type->isFieldable() && !empty($base_route)) { + // Make sure entity type is extendable and has a base route. + if ($entity_type->isExtendable() && !empty($base_route)) { $info[$entity_type_id . '_fields'] = array( 'base_route_name' => 'field_ui.instance_edit_' . $entity_type_id, 'entity_type' => 'field_instance_config', diff --git a/core/modules/contact/lib/Drupal/contact/Entity/Message.php b/core/modules/contact/lib/Drupal/contact/Entity/Message.php index ff35420..d3d7b3e 100644 --- a/core/modules/contact/lib/Drupal/contact/Entity/Message.php +++ b/core/modules/contact/lib/Drupal/contact/Entity/Message.php @@ -29,7 +29,7 @@ * "bundle" = "category" * }, * bundle_entity_type = "contact_category", - * fieldable = TRUE, + * extendable = TRUE, * links = { * "admin-form" = "contact.category_edit" * } diff --git a/core/modules/content_translation/content_translation.admin.inc b/core/modules/content_translation/content_translation.admin.inc index 557f06e..82daf8f 100644 --- a/core/modules/content_translation/content_translation.admin.inc +++ b/core/modules/content_translation/content_translation.admin.inc @@ -88,7 +88,7 @@ function _content_translation_form_language_content_settings_form_alter(array &$ // Only show the checkbox to enable translation if the bundles in the // entity might have fields and if there are fields to translate. - if ($entity_type->isFieldable()) { + if ($entity_type->isExtendable()) { $fields = $entity_manager->getFieldDefinitions($entity_type_id, $bundle); if ($fields) { $form['settings'][$entity_type_id][$bundle]['translatable'] = array( diff --git a/core/modules/entity/lib/Drupal/entity/Controller/EntityDisplayModeController.php b/core/modules/entity/lib/Drupal/entity/Controller/EntityDisplayModeController.php index f0db942..71a0b13 100644 --- a/core/modules/entity/lib/Drupal/entity/Controller/EntityDisplayModeController.php +++ b/core/modules/entity/lib/Drupal/entity/Controller/EntityDisplayModeController.php @@ -23,7 +23,7 @@ class EntityDisplayModeController extends ControllerBase { public function viewModeTypeSelection() { $entity_types = array(); foreach ($this->entityManager()->getDefinitions() as $entity_type_id => $entity_type) { - if ($entity_type->isFieldable() && $entity_type->hasViewBuilderClass()) { + if ($entity_type->isExtendable() && $entity_type->hasViewBuilderClass()) { $entity_types[$entity_type_id] = array( 'title' => $entity_type->getLabel(), 'link_path' => 'admin/structure/display-modes/view/add/' . $entity_type_id, @@ -46,7 +46,7 @@ public function viewModeTypeSelection() { public function formModeTypeSelection() { $entity_types = array(); foreach ($this->entityManager()->getDefinitions() as $entity_type_id => $entity_type) { - if ($entity_type->isFieldable() && $entity_type->hasFormClasses()) { + if ($entity_type->isExtendable() && $entity_type->hasFormClasses()) { $entity_types[$entity_type_id] = array( 'title' => $entity_type->getLabel(), 'link_path' => 'admin/structure/display-modes/form/add/' . $entity_type_id, diff --git a/core/modules/entity/lib/Drupal/entity/EntityDisplayModeListBuilder.php b/core/modules/entity/lib/Drupal/entity/EntityDisplayModeListBuilder.php index 05c241a..ec27fcd 100644 --- a/core/modules/entity/lib/Drupal/entity/EntityDisplayModeListBuilder.php +++ b/core/modules/entity/lib/Drupal/entity/EntityDisplayModeListBuilder.php @@ -93,7 +93,7 @@ public function render() { } // Filter entities - if ($this->entityTypes[$entity_type]->isFieldable() && !$this->isValidEntity($entity_type)) { + if ($this->entityTypes[$entity_type]->isExtendable() && !$this->isValidEntity($entity_type)) { continue; } diff --git a/core/modules/entity/lib/Drupal/entity/Form/EntityDisplayModeAddForm.php b/core/modules/entity/lib/Drupal/entity/Form/EntityDisplayModeAddForm.php index 49be44f..7a287b4 100644 --- a/core/modules/entity/lib/Drupal/entity/Form/EntityDisplayModeAddForm.php +++ b/core/modules/entity/lib/Drupal/entity/Form/EntityDisplayModeAddForm.php @@ -48,7 +48,7 @@ public function validate(array $form, array &$form_state) { */ protected function prepareEntity() { $definition = $this->entityManager->getDefinition($this->targetEntityTypeId); - if (!$definition->isFieldable() || !$definition->hasViewBuilderClass()) { + if (!$definition->isExtendable() || !$definition->hasViewBuilderClass()) { throw new NotFoundHttpException(); } diff --git a/core/modules/entity/lib/Drupal/entity/Form/EntityFormModeAddForm.php b/core/modules/entity/lib/Drupal/entity/Form/EntityFormModeAddForm.php index 4cdece5..cee7dbb 100644 --- a/core/modules/entity/lib/Drupal/entity/Form/EntityFormModeAddForm.php +++ b/core/modules/entity/lib/Drupal/entity/Form/EntityFormModeAddForm.php @@ -19,7 +19,7 @@ class EntityFormModeAddForm extends EntityDisplayModeAddForm { */ protected function prepareEntity() { $definition = $this->entityManager->getDefinition($this->targetEntityTypeId); - if (!$definition->isFieldable() || !$definition->hasFormClasses()) { + if (!$definition->isExtendable() || !$definition->hasFormClasses()) { throw new NotFoundHttpException(); } diff --git a/core/modules/entity_reference/lib/Drupal/entity_reference/Plugin/Field/FieldFormatter/EntityReferenceFormatterBase.php b/core/modules/entity_reference/lib/Drupal/entity_reference/Plugin/Field/FieldFormatter/EntityReferenceFormatterBase.php index e0b6e0e..8d1bfcf 100644 --- a/core/modules/entity_reference/lib/Drupal/entity_reference/Plugin/Field/FieldFormatter/EntityReferenceFormatterBase.php +++ b/core/modules/entity_reference/lib/Drupal/entity_reference/Plugin/Field/FieldFormatter/EntityReferenceFormatterBase.php @@ -55,7 +55,7 @@ public function prepareView(array $entities_items) { } } - // Iterate through the fieldable entities again to attach the loaded data. + // Iterate through the extendable entities again to attach the loaded data. foreach ($entities_items as $items) { $rekey = FALSE; foreach ($items as $item) { diff --git a/core/modules/field/field.module b/core/modules/field/field.module index db35e40..915cbbc 100644 --- a/core/modules/field/field.module +++ b/core/modules/field/field.module @@ -27,7 +27,7 @@ * * The Field API allows custom data fields to be attached to Drupal entities and * takes care of storing, loading, editing, and rendering field data. Any entity - * type (node, user, etc.) can use the Field API to make itself "fieldable" and + * type (node, user, etc.) can use the Field API to make itself "extendable" and * thus allow fields to be attached to it. Other modules can provide a user * interface for managing custom fields via a web browser as well as a wide and * flexible variety of data type, form element, and display format capabilities. @@ -36,7 +36,7 @@ * the concept of a Bundle. A Field defines a particular type of data that can * be attached to entities. A Field Instance is a Field attached to a single * Bundle. A Bundle is a set of fields that are treated as a group by the Field - * Attach API and is related to a single fieldable entity type. + * Attach API and is related to a single extendable entity type. * * For example, suppose a site administrator wants Article nodes to have a * subtitle and photo. Using the Field API or Field UI module, the administrator @@ -60,8 +60,8 @@ * - @link field_attach Field Attach API @endlink: Connects entity types to the * Field API. Field Attach API functions load, store, generate Form API * structures, display, and perform a variety of other functions for field - * data connected to individual entities. Fieldable entity types like node and - * user use this API to make themselves fieldable. + * data connected to individual entities. Extendable entity types like node and + * user use this API to make themselves extendable. * * - @link field_info Field Info API @endlink: Exposes information about all * fields, instances, widgets, and related information defined by or with the @@ -82,7 +82,7 @@ function field_help($path, $arg) { case 'admin/help#field': $output = ''; $output .= '
' . t('The Field module allows custom data fields to be defined for entity types (entities include content items, comments, user accounts, and taxonomy terms). The Field module takes care of storing, loading, editing, and rendering field data. Most users will not interact with the Field module directly, but will instead use the Field UI module user interface. Module developers can use the Field API to make new entity types "fieldable" and thus allow fields to be attached to them. For more information, see the online handbook entry for Field module.', array('@field-ui-help' => url('admin/help/field_ui'), '@field' => 'http://drupal.org/documentation/modules/field')) . '
'; + $output .= '' . t('The Field module allows custom data fields to be defined for entity types (entities include content items, comments, user accounts, and taxonomy terms). The Field module takes care of storing, loading, editing, and rendering field data. Most users will not interact with the Field module directly, but will instead use the Field UI module user interface. Module developers can use the Field API to make new entity types "extendable" and thus allow fields to be attached to them. For more information, see the online handbook entry for Field module.', array('@field-ui-help' => url('admin/help/field_ui'), '@field' => 'http://drupal.org/documentation/modules/field')) . '
'; $output .= '