From f3d9167cf3c0fb78e07505b844f4cebd36a1eb2e Mon Sep 17 00:00:00 2001 From: Herb v/d Dool Date: Tue, 18 Jan 2022 21:23:31 -0500 Subject: [PATCH] Add back in Entity in some cases --- entityreference.module | 4 ++-- .../selection/EntityReferenceSelectionHandlerViews.inc | 2 +- views/entityreference.views.inc | 8 ++++---- views/entityreference_plugin_display.inc | 4 ++-- views/entityreference_plugin_row_fields.inc | 2 +- 5 files changed, 10 insertions(+), 10 deletions(-) diff --git a/entityreference.module b/entityreference.module index 7cbdd17..4484fe8 100644 --- a/entityreference.module +++ b/entityreference.module @@ -13,7 +13,7 @@ define('ENTITYREFERENCE_DENIED', '- Restricted access -'); function entityreference_field_info() { return array( 'entityreference' => array( - 'label' => 'Reference', + 'label' => 'Entity Reference', 'description' => t('Defines a field type for referencing other entities.'), 'settings' => array( 'target_type' => 'node', @@ -1433,7 +1433,7 @@ function entityreference_entityreference_selection_plugins() { ); if (module_exists('views')) { $plugins['views'] = array( - 'title' => t('Views: Filter by a reference view'), + 'title' => t('Views: Filter by an entity reference view'), 'class' => 'EntityReferenceSelectionHandlerViews', 'weight' => 0, ); diff --git a/plugins/selection/EntityReferenceSelectionHandlerViews.inc b/plugins/selection/EntityReferenceSelectionHandlerViews.inc index b4ec319..1f39bca 100644 --- a/plugins/selection/EntityReferenceSelectionHandlerViews.inc +++ b/plugins/selection/EntityReferenceSelectionHandlerViews.inc @@ -52,7 +52,7 @@ class EntityReferenceSelectionHandlerViews implements EntityReferenceSelectionHa '#required' => TRUE, '#options' => $options, '#default_value' => $default, - '#description' => '

' . t('Choose the view and display that select the entities that can be referenced.
Only views with a display of type "Reference" are eligible.') . '

', + '#description' => '

' . t('Choose the view and display that select the entities that can be referenced.
Only views with a display of type "Entity Reference" are eligible.') . '

', ); $default = !empty($view_settings['args']) ? implode(', ', $view_settings['args']) : ''; diff --git a/views/entityreference.views.inc b/views/entityreference.views.inc index 5320776..4587383 100644 --- a/views/entityreference.views.inc +++ b/views/entityreference.views.inc @@ -25,7 +25,7 @@ function entityreference_field_views_data($field) { 'base' => $entity_info['base table'], 'base field' => $entity_info['entity keys']['id'], 'label' => t('@entity referenced from !field_name', $parameters), - 'group' => t('Reference'), + 'group' => t('Entity Reference'), 'title' => t('Referenced Entity'), 'help' => t('A bridge to the @entity entity that is referenced via !field_name', $parameters), ); @@ -77,7 +77,7 @@ function entityreference_field_views_data_views_data_alter(&$data, $field) { 'base' => $entity_info['base table'], 'base field' => $entity_info['entity keys']['id'], 'label' => t('@entity referencing @target_entity from !field_name', $replacements), - 'group' => t('Reference'), + 'group' => t('Entity Reference'), 'title' => t('Referencing entity'), 'help' => t('A bridge to the @entity entity that is referencing @target_entity via !field_name', $replacements), 'join_extra' => array( @@ -103,7 +103,7 @@ function entityreference_views_plugins() { $plugins = array( 'display' => array( 'entityreference' => array( - 'title' => t('Reference'), + 'title' => t('Entity Reference'), 'admin' => t('Reference Source'), 'help' => 'Selects referenceable entities for a reference field', 'handler' => 'entityreference_plugin_display', @@ -118,7 +118,7 @@ function entityreference_views_plugins() { ), 'style' => array( 'entityreference_style' => array( - 'title' => t('Reference list'), + 'title' => t('Entity Reference list'), 'help' => 'Returns results as a list of labels and rendered rows.', 'handler' => 'entityreference_plugin_style', 'theme' => 'views_view_unformatted', diff --git a/views/entityreference_plugin_display.inc b/views/entityreference_plugin_display.inc index 0840aad..a9ad50c 100644 --- a/views/entityreference_plugin_display.inc +++ b/views/entityreference_plugin_display.inc @@ -111,7 +111,7 @@ class entityreference_plugin_display extends views_plugin_display { // Verify that search fields are set up. $style_options = $this->get_option('style_options'); if (!isset($style_options['search_fields'])) { - $errors[] = t('Display "@display" needs a selected search fields to work properly. See the settings for the Reference list format.', array('@display' => $this->display->display_title)); + $errors[] = t('Display "@display" needs a selected search fields to work properly. See the settings for the Entity Reference list format.', array('@display' => $this->display->display_title)); } else { // Verify that the search fields used actually exist. @@ -119,7 +119,7 @@ class entityreference_plugin_display extends views_plugin_display { $fields = array_keys($this->handlers['field']); foreach ($style_options['search_fields'] as $field_alias => $enabled) { if ($enabled && !in_array($field_alias, $fields)) { - $errors[] = t('Display "@display" uses field %field as search field, but the field is no longer present. See the settings for the Reference list format.', array('@display' => $this->display->display_title, '%field' => $field_alias)); + $errors[] = t('Display "@display" uses field %field as search field, but the field is no longer present. See the settings for the Entity Reference list format.', array('@display' => $this->display->display_title, '%field' => $field_alias)); } } } diff --git a/views/entityreference_plugin_row_fields.inc b/views/entityreference_plugin_row_fields.inc index 6b86f44..b6a6eea 100644 --- a/views/entityreference_plugin_row_fields.inc +++ b/views/entityreference_plugin_row_fields.inc @@ -21,7 +21,7 @@ class entityreference_plugin_row_fields extends views_plugin_row_fields { parent::options_form($form, $form_state); // Expand the description of the 'Inline field' checkboxes. - $form['inline']['#description'] .= '
' . t("Note: In 'Reference' displays, all fields will be displayed inline unless an explicit selection of inline fields is made here." ); + $form['inline']['#description'] .= '
' . t("Note: In 'Entity Reference' displays, all fields will be displayed inline unless an explicit selection of inline fields is made here." ); } function pre_render($row) {