diff --git a/core/modules/views/lib/Drupal/views/Plugin/Core/Entity/View.php b/core/modules/views/lib/Drupal/views/Plugin/Core/Entity/View.php index b583f78..f310789 100644 --- a/core/modules/views/lib/Drupal/views/Plugin/Core/Entity/View.php +++ b/core/modules/views/lib/Drupal/views/Plugin/Core/Entity/View.php @@ -56,6 +56,11 @@ class View extends ConfigEntityBase implements ViewStorageInterface { public $id = NULL; /** + * The label of the view. + */ + protected $label; + + /** * The description of the view, which is used only in the interface. * * @var string @@ -73,13 +78,6 @@ class View extends ConfigEntityBase implements ViewStorageInterface { protected $tag = ''; /** - * The human readable name of the view. - * - * @var string - */ - public $human_name = ''; - - /** * The core version the view was created for. * * @var int @@ -360,7 +358,7 @@ public function getExportProperties() { 'description', 'status', 'display', - 'human_name', + 'label', 'module', 'id', 'tag', diff --git a/core/modules/views/lib/Drupal/views/Plugin/views/area/Result.php b/core/modules/views/lib/Drupal/views/Plugin/views/area/Result.php index 7872be6..46ff00e 100644 --- a/core/modules/views/lib/Drupal/views/Plugin/views/area/Result.php +++ b/core/modules/views/lib/Drupal/views/Plugin/views/area/Result.php @@ -38,7 +38,7 @@ public function buildOptionsForm(&$form, &$form_state) { '@start -- the initial record number in the set', '@end -- the last record number in the set', '@total -- the total records in the set', - '@name -- the human-readable name of the view', + '@label -- the human-readable name of the view', '@per_page -- the number of items per page', '@current_page -- the current page number', '@current_record_count -- the current page record count', @@ -73,7 +73,7 @@ function render($empty = FALSE) { // @TODO: Maybe use a possible is views empty functionality. // Not every view has total_rows set, use view->result instead. $total = isset($this->view->total_rows) ? $this->view->total_rows : count($this->view->result); - $name = check_plain($this->view->storage->label()); + $label = check_plain($this->view->storage->label()); if ($per_page === 0) { $page_count = 1; $start = 1; @@ -90,7 +90,7 @@ function render($empty = FALSE) { } $current_record_count = ($end - $start) + 1; // Get the search information. - $items = array('start', 'end', 'total', 'name', 'per_page', 'current_page', 'current_record_count', 'page_count'); + $items = array('start', 'end', 'total', 'label', 'per_page', 'current_page', 'current_record_count', 'page_count'); $replacements = array(); foreach ($items as $item) { $replacements["@$item"] = ${$item}; diff --git a/core/modules/views/lib/Drupal/views/Plugin/views/query/Sql.php b/core/modules/views/lib/Drupal/views/Plugin/views/query/Sql.php index 856dd40..369d441 100644 --- a/core/modules/views/lib/Drupal/views/Plugin/views/query/Sql.php +++ b/core/modules/views/lib/Drupal/views/Plugin/views/query/Sql.php @@ -1514,7 +1514,7 @@ function execute(ViewExecutable $view) { drupal_set_message($e->getMessage(), 'error'); } else { - throw new DatabaseExceptionWrapper(format_string('Exception in @human_name[@view_name]: @message', array('@human_name' => $view->storage->label(), '@view_name' => $view->storage->id(), '@message' => $e->getMessage()))); + throw new DatabaseExceptionWrapper(format_string('Exception in @label[@view_name]: @message', array('@label' => $view->storage->label(), '@view_name' => $view->storage->id(), '@message' => $e->getMessage()))); } } diff --git a/core/modules/views/lib/Drupal/views/Plugin/views/wizard/WizardPluginBase.php b/core/modules/views/lib/Drupal/views/Plugin/views/wizard/WizardPluginBase.php index 50013dc..d343e7b 100644 --- a/core/modules/views/lib/Drupal/views/Plugin/views/wizard/WizardPluginBase.php +++ b/core/modules/views/lib/Drupal/views/Plugin/views/wizard/WizardPluginBase.php @@ -622,7 +622,7 @@ protected function instantiate_view($form, &$form_state) { // Build the basic view properties and create the view. $values = array( 'id' => $form_state['values']['id'], - 'human_name' => $form_state['values']['human_name'], + 'label' => $form_state['values']['label'], 'description' => $form_state['values']['description'], 'base_table' => $this->base_table, ); diff --git a/core/modules/views/lib/Drupal/views/Tests/TokenReplaceTest.php b/core/modules/views/lib/Drupal/views/Tests/TokenReplaceTest.php index 632504f..6ed0f95 100644 --- a/core/modules/views/lib/Drupal/views/Tests/TokenReplaceTest.php +++ b/core/modules/views/lib/Drupal/views/Tests/TokenReplaceTest.php @@ -42,7 +42,7 @@ function testTokenReplacement() { $this->executeView($view); $expected = array( - '[view:name]' => 'Test tokens', + '[view:label]' => 'Test tokens', '[view:description]' => 'Test view to token replacement tests.', '[view:id]' => 'test_tokens', '[view:title]' => 'Test token page', diff --git a/core/modules/views/lib/Drupal/views/Tests/UI/DefaultViewsTest.php b/core/modules/views/lib/Drupal/views/Tests/UI/DefaultViewsTest.php index 2780e40..5a18aef 100644 --- a/core/modules/views/lib/Drupal/views/Tests/UI/DefaultViewsTest.php +++ b/core/modules/views/lib/Drupal/views/Tests/UI/DefaultViewsTest.php @@ -86,7 +86,7 @@ function testDefaultViews() { $edit = array( 'id' => 'clone_of_frontpage', ); - $this->assertTitle(t('Clone of @human_name | @site-name', array('@human_name' => 'Front page', '@site-name' => config('system.site')->get('name')))); + $this->assertTitle(t('Clone of @label | @site-name', array('@label' => 'Front page', '@site-name' => config('system.site')->get('name')))); $this->drupalPost(NULL, $edit, t('Clone')); $this->assertUrl('admin/structure/views/view/clone_of_frontpage/edit', array(), 'The normal cloning name schema is applied.'); diff --git a/core/modules/views/lib/Drupal/views/Tests/UI/DisplayTest.php b/core/modules/views/lib/Drupal/views/Tests/UI/DisplayTest.php index d89f889..79e2453 100644 --- a/core/modules/views/lib/Drupal/views/Tests/UI/DisplayTest.php +++ b/core/modules/views/lib/Drupal/views/Tests/UI/DisplayTest.php @@ -40,7 +40,7 @@ public static function getInfo() { public function randomView(array $view = array()) { // Create a new view in the UI. $default = array(); - $default['human_name'] = $this->randomName(16); + $default['label'] = $this->randomName(16); $default['id'] = strtolower($this->randomName(16)); $default['description'] = $this->randomName(16); $default['page[create]'] = TRUE; diff --git a/core/modules/views/lib/Drupal/views/Tests/UI/OverrideDisplaysTest.php b/core/modules/views/lib/Drupal/views/Tests/UI/OverrideDisplaysTest.php index b60f9d4..5985399 100644 --- a/core/modules/views/lib/Drupal/views/Tests/UI/OverrideDisplaysTest.php +++ b/core/modules/views/lib/Drupal/views/Tests/UI/OverrideDisplaysTest.php @@ -26,7 +26,7 @@ public static function getInfo() { function testOverrideDisplays() { // Create a basic view that shows all content, with a page and a block // display. - $view['human_name'] = $this->randomName(16); + $view['label'] = $this->randomName(16); $view['id'] = strtolower($this->randomName(16)); $view['page[create]'] = 1; $view['page[path]'] = $this->randomName(16); @@ -55,7 +55,7 @@ function testOverrideDisplays() { // Confirm that the view block is available in the block administration UI. $this->drupalGet('admin/structure/block/list/block_plugin_ui:' . variable_get('theme_default', 'stark') . '/add'); - $this->assertText('View: ' . $view['human_name']); + $this->assertText('View: ' . $view['label']); // Place the block. $this->drupalPlaceBlock("views_block:{$view['id']}-block_1"); @@ -85,7 +85,7 @@ function testWizardMixedDefaultOverriddenDisplays() { // identical titles, but give the block a different one, so we expect the // page and feed to inherit their titles from the default display, but the // block to override it. - $view['human_name'] = $this->randomName(16); + $view['label'] = $this->randomName(16); $view['id'] = strtolower($this->randomName(16)); $view['page[create]'] = 1; $view['page[title]'] = $this->randomName(16); @@ -114,7 +114,7 @@ function testWizardMixedDefaultOverriddenDisplays() { // Confirm that the block is available in the block administration UI. $this->drupalGet('admin/structure/block/list/block_plugin_ui:' . variable_get('theme_default', 'stark') . '/add'); - $this->assertText('View: ' . $view['human_name']); + $this->assertText('View: ' . $view['label']); // Place the block. $this->drupalPlaceBlock("views_block:{$view['id']}-block_1"); @@ -167,7 +167,7 @@ function testRevertAllDisplays() { // Create a basic view with a page, block. // Because there is both a title on page and block we expect the title on // the block be overriden. - $view['human_name'] = $this->randomName(16); + $view['label'] = $this->randomName(16); $view['id'] = strtolower($this->randomName(16)); $view['page[create]'] = 1; $view['page[title]'] = $this->randomName(16); diff --git a/core/modules/views/lib/Drupal/views/Tests/UI/SettingsTest.php b/core/modules/views/lib/Drupal/views/Tests/UI/SettingsTest.php index 28978d6..7f282b4 100644 --- a/core/modules/views/lib/Drupal/views/Tests/UI/SettingsTest.php +++ b/core/modules/views/lib/Drupal/views/Tests/UI/SettingsTest.php @@ -44,7 +44,7 @@ function testEditUI() { $this->drupalPost('admin/structure/views/settings', $edit, t('Save configuration')); $view = array(); - $view['human_name'] = $this->randomName(16); + $view['label'] = $this->randomName(16); $view['id'] = strtolower($this->randomName(16)); $view['description'] = $this->randomName(16); $view['page[create]'] = TRUE; diff --git a/core/modules/views/lib/Drupal/views/Tests/UI/StorageTest.php b/core/modules/views/lib/Drupal/views/Tests/UI/StorageTest.php index c740132..5731156 100644 --- a/core/modules/views/lib/Drupal/views/Tests/UI/StorageTest.php +++ b/core/modules/views/lib/Drupal/views/Tests/UI/StorageTest.php @@ -28,7 +28,7 @@ public static function getInfo() { } /** - * Tests changing human_name, description and tag. + * Tests changing label, description and tag. * * @see views_ui_edit_details_form */ @@ -37,7 +37,7 @@ public function testDetails() { $view = views_get_view($view_name); $edit = array( - 'human_name' => $this->randomName(), + 'label' => $this->randomName(), 'tag' => $this->randomName(), 'description' => $this->randomName(30), ); @@ -46,7 +46,7 @@ public function testDetails() { $this->drupalPost(NULL, array(), t('Save')); $view = views_get_view($view_name); - foreach (array('human_name', 'tag', 'description') as $property) { + foreach (array('label', 'tag', 'description') as $property) { $this->assertEqual($view->storage->get($property), $edit[$property], format_string('Make sure the property @property got probably saved.', array('@property' => $property))); } } diff --git a/core/modules/views/lib/Drupal/views/Tests/ViewExecutableTest.php b/core/modules/views/lib/Drupal/views/Tests/ViewExecutableTest.php index ea3a87c..b816921 100644 --- a/core/modules/views/lib/Drupal/views/Tests/ViewExecutableTest.php +++ b/core/modules/views/lib/Drupal/views/Tests/ViewExecutableTest.php @@ -41,7 +41,7 @@ class ViewExecutableTest extends ViewUnitTestBase { 'description', 'tag', 'base_table', - 'human_name', + 'label', 'core', 'display', ); diff --git a/core/modules/views/lib/Drupal/views/Tests/ViewStorageTest.php b/core/modules/views/lib/Drupal/views/Tests/ViewStorageTest.php index 91f7b31..a1adc89 100644 --- a/core/modules/views/lib/Drupal/views/Tests/ViewStorageTest.php +++ b/core/modules/views/lib/Drupal/views/Tests/ViewStorageTest.php @@ -33,7 +33,7 @@ class ViewStorageTest extends ViewUnitTestBase { 'description', 'tag', 'base_table', - 'human_name', + 'label', 'core', 'display', ); @@ -355,7 +355,7 @@ public function testCreateDuplicate() { 'description', 'tag', 'base_table', - 'human_name', + 'label', 'core', ); diff --git a/core/modules/views/lib/Drupal/views/Tests/Wizard/BasicTest.php b/core/modules/views/lib/Drupal/views/Tests/Wizard/BasicTest.php index b786859..dc8c5c4 100644 --- a/core/modules/views/lib/Drupal/views/Tests/Wizard/BasicTest.php +++ b/core/modules/views/lib/Drupal/views/Tests/Wizard/BasicTest.php @@ -30,14 +30,14 @@ function testViewsWizardAndListing() { // Create a simple and not at all useful view. $view1 = array(); - $view1['human_name'] = $this->randomName(16); + $view1['label'] = $this->randomName(16); $view1['id'] = strtolower($this->randomName(16)); $view1['description'] = $this->randomName(16); $view1['page[create]'] = FALSE; $this->drupalPost('admin/structure/views/add', $view1, t('Save and edit')); $this->assertResponse(200); $this->drupalGet('admin/structure/views'); - $this->assertText($view1['human_name']); + $this->assertText($view1['label']); $this->assertText($view1['description']); // @todo For now, clone is being left to config.module to solve. foreach (array('delete', 'edit') as $operation) { @@ -46,7 +46,7 @@ function testViewsWizardAndListing() { // This view should not have a block. $this->drupalGet('admin/structure/block'); - $this->assertNoText('View: ' . $view1['human_name']); + $this->assertNoText('View: ' . $view1['label']); // Create two nodes. $node1 = $this->drupalCreateNode(array('type' => 'page')); @@ -54,7 +54,7 @@ function testViewsWizardAndListing() { // Now create a page with simple node listing and an attached feed. $view2 = array(); - $view2['human_name'] = $this->randomName(16); + $view2['label'] = $this->randomName(16); $view2['id'] = strtolower($this->randomName(16)); $view2['description'] = $this->randomName(16); $view2['page[create]'] = 1; @@ -86,17 +86,17 @@ function testViewsWizardAndListing() { // Go back to the views page and check if this view is there. $this->drupalGet('admin/structure/views'); - $this->assertText($view2['human_name']); + $this->assertText($view2['label']); $this->assertText($view2['description']); $this->assertLinkByHref(url($view2['page[path]'])); // This view should not have a block. $this->drupalGet('admin/structure/block'); - $this->assertNoText('View: ' . $view2['human_name']); + $this->assertNoText('View: ' . $view2['label']); // Create a view with a page and a block, and filter the listing. $view3 = array(); - $view3['human_name'] = $this->randomName(16); + $view3['label'] = $this->randomName(16); $view3['id'] = strtolower($this->randomName(16)); $view3['description'] = $this->randomName(16); $view3['show[wizard_key]'] = 'node'; @@ -118,13 +118,13 @@ function testViewsWizardAndListing() { // Go back to the views page and check if this view is there. $this->drupalGet('admin/structure/views'); - $this->assertText($view3['human_name']); + $this->assertText($view3['label']); $this->assertText($view3['description']); $this->assertLinkByHref(url($view3['page[path]'])); // Confirm that the block is available in the block administration UI. $this->drupalGet('admin/structure/block/list/block_plugin_ui:' . variable_get('theme_default', 'stark') . '/add'); - $this->assertText('View: ' . $view3['human_name']); + $this->assertText('View: ' . $view3['label']); // Place the block. $this->drupalPlaceBlock("views_block:{$view3['id']}-block_1"); @@ -147,7 +147,7 @@ function testViewsWizardAndListing() { protected function testWizardForm() { $this->drupalGet('admin/structure/views/add'); - $result = $this->xpath('//small[@id = "edit-human-name-machine-name-suffix"]'); + $result = $this->xpath('//small[@id = "edit-label-machine-name-suffix"]'); $this->assertTrue(count($result), 'Ensure that the machine name is applied to the name field.'); } } diff --git a/core/modules/views/lib/Drupal/views/Tests/Wizard/ItemsPerPageTest.php b/core/modules/views/lib/Drupal/views/Tests/Wizard/ItemsPerPageTest.php index 16e86fa..2d80af2 100644 --- a/core/modules/views/lib/Drupal/views/Tests/Wizard/ItemsPerPageTest.php +++ b/core/modules/views/lib/Drupal/views/Tests/Wizard/ItemsPerPageTest.php @@ -40,7 +40,7 @@ function testItemsPerPage() { // Create a view that sorts newest first, and shows 4 items in the page and // 3 in the block. $view = array(); - $view['human_name'] = $this->randomName(16); + $view['label'] = $this->randomName(16); $view['id'] = strtolower($this->randomName(16)); $view['description'] = $this->randomName(16); $view['show[wizard_key]'] = 'node'; @@ -76,7 +76,7 @@ function testItemsPerPage() { // Confirm that the block is listed in the block administration UI. $this->drupalGet('admin/structure/block/list/block_plugin_ui:' . variable_get('theme_default', 'stark') . '/add'); - $this->assertText('View: ' . $view['human_name']); + $this->assertText('View: ' . $view['label']); // Place the block, visit a page that displays the block, and check that the // nodes we expect appear in the correct order. $this->drupalPlaceBlock("views_block:{$view['id']}-block_1"); diff --git a/core/modules/views/lib/Drupal/views/Tests/Wizard/MenuTest.php b/core/modules/views/lib/Drupal/views/Tests/Wizard/MenuTest.php index 9c9ab60..5903552 100644 --- a/core/modules/views/lib/Drupal/views/Tests/Wizard/MenuTest.php +++ b/core/modules/views/lib/Drupal/views/Tests/Wizard/MenuTest.php @@ -26,7 +26,7 @@ public static function getInfo() { function testMenus() { // Create a view with a page display and a menu link in the Main Menu. $view = array(); - $view['human_name'] = $this->randomName(16); + $view['label'] = $this->randomName(16); $view['id'] = strtolower($this->randomName(16)); $view['description'] = $this->randomName(16); $view['page[create]'] = 1; diff --git a/core/modules/views/lib/Drupal/views/Tests/Wizard/SortingTest.php b/core/modules/views/lib/Drupal/views/Tests/Wizard/SortingTest.php index 0813353..9ca635d 100644 --- a/core/modules/views/lib/Drupal/views/Tests/Wizard/SortingTest.php +++ b/core/modules/views/lib/Drupal/views/Tests/Wizard/SortingTest.php @@ -32,7 +32,7 @@ function testSorting() { // Create a view that sorts oldest first. $view1 = array(); - $view1['human_name'] = $this->randomName(16); + $view1['label'] = $this->randomName(16); $view1['id'] = strtolower($this->randomName(16)); $view1['description'] = $this->randomName(16); $view1['show[sort]'] = 'created:ASC'; @@ -57,7 +57,7 @@ function testSorting() { // Create a view that sorts newest first. $view2 = array(); - $view2['human_name'] = $this->randomName(16); + $view2['label'] = $this->randomName(16); $view2['id'] = strtolower($this->randomName(16)); $view2['description'] = $this->randomName(16); $view2['show[sort]'] = 'created:DESC'; diff --git a/core/modules/views/lib/Drupal/views/Tests/Wizard/TaggedWithTest.php b/core/modules/views/lib/Drupal/views/Tests/Wizard/TaggedWithTest.php index 6416193..7c150dc 100644 --- a/core/modules/views/lib/Drupal/views/Tests/Wizard/TaggedWithTest.php +++ b/core/modules/views/lib/Drupal/views/Tests/Wizard/TaggedWithTest.php @@ -124,7 +124,7 @@ function testTaggedWith() { $view1['show[type]'] = $this->node_type_with_tags->type; $this->drupalPost('admin/structure/views/add', $view1, t('Update "of type" choice')); // Now resubmit the entire form to the same URL. - $view1['human_name'] = $this->randomName(16); + $view1['label'] = $this->randomName(16); $view1['id'] = strtolower($this->randomName(16)); $view1['description'] = $this->randomName(16); $view1['show[tagged_with]'] = 'tag1'; @@ -146,7 +146,7 @@ function testTaggedWith() { $view2['show[type]'] = $this->node_type_with_tags->type; $this->drupalPost('admin/structure/views/add', $view2, t('Update "of type" choice')); $this->assertResponse(200); - $view2['human_name'] = $this->randomName(16); + $view2['label'] = $this->randomName(16); $view2['id'] = strtolower($this->randomName(16)); $view2['description'] = $this->randomName(16); $view2['show[tagged_with]'] = 'tag2'; diff --git a/core/modules/views/views.tokens.inc b/core/modules/views/views.tokens.inc index 051065b..b13a544 100644 --- a/core/modules/views/views.tokens.inc +++ b/core/modules/views/views.tokens.inc @@ -14,9 +14,9 @@ function views_token_info() { 'description' => t('Tokens related to views.'), 'needs-data' => 'view', ); - $info['tokens']['view']['name'] = array( - 'name' => t('Name'), - 'description' => t('The human-readable name of the view.'), + $info['tokens']['view']['label'] = array( + 'name' => t('Label'), + 'description' => t('The label of the view.'), ); $info['tokens']['view']['description'] = array( 'name' => t('Description'), diff --git a/core/modules/views/views_ui/admin.inc b/core/modules/views/views_ui/admin.inc index c3b8d8b..238aa84 100644 --- a/core/modules/views/views_ui/admin.inc +++ b/core/modules/views/views_ui/admin.inc @@ -660,7 +660,7 @@ function views_ui_edit_details_form($form, &$form_state) { '#theme_wrappers' => array('container'), '#attributes' => array('class' => array('scroll')), ); - $form['details']['human_name'] = array( + $form['details']['label'] = array( '#type' => 'textfield', '#title' => t('Human-readable name'), '#description' => t('A descriptive human-readable name for this view. Spaces are allowed'), diff --git a/core/modules/views/views_ui/js/views-admin.js b/core/modules/views/views_ui/js/views-admin.js index a8fc481..b3ddee7 100644 --- a/core/modules/views/views_ui/js/views-admin.js +++ b/core/modules/views/views_ui/js/views-admin.js @@ -99,7 +99,7 @@ Drupal.viewsUi.FormFieldFiller = function ($target, exclude, replace, suffix) { "use strict"; var $ = jQuery; - this.source = $('#edit-human-name'); + this.source = $('#edit-label'); this.target = $target; this.exclude = exclude || false; this.replace = replace || ''; diff --git a/core/modules/views/views_ui/lib/Drupal/views_ui/Routing/ViewsUIController.php b/core/modules/views/views_ui/lib/Drupal/views_ui/Routing/ViewsUIController.php index d16ba2c..beb006d 100644 --- a/core/modules/views/views_ui/lib/Drupal/views_ui/Routing/ViewsUIController.php +++ b/core/modules/views/views_ui/lib/Drupal/views_ui/Routing/ViewsUIController.php @@ -229,7 +229,7 @@ public function ajaxOperation(ViewStorageInterface $view, $op, Request $request) * The Views clone form. */ public function cloneForm(ViewStorageInterface $view) { - drupal_set_title(t('Clone of @human_name', array('@human_name' => $view->label()))); + drupal_set_title(t('Clone of @label', array('@label' => $view->label()))); return entity_get_form($view, 'clone'); } diff --git a/core/modules/views/views_ui/lib/Drupal/views_ui/ViewAddFormController.php b/core/modules/views/views_ui/lib/Drupal/views_ui/ViewAddFormController.php index ca6478d..9bf79b6 100644 --- a/core/modules/views/views_ui/lib/Drupal/views_ui/ViewAddFormController.php +++ b/core/modules/views/views_ui/lib/Drupal/views_ui/ViewAddFormController.php @@ -36,7 +36,7 @@ public function form(array $form, array &$form_state, EntityInterface $view) { '#attributes' => array('class' => array('fieldset-no-legend')), ); - $form['name']['human_name'] = array( + $form['name']['label'] = array( '#type' => 'textfield', '#title' => t('View name'), '#required' => TRUE, @@ -49,7 +49,7 @@ public function form(array $form, array &$form_state, EntityInterface $view) { '#maxlength' => 128, '#machine_name' => array( 'exists' => 'views_get_view', - 'source' => array('name', 'human_name'), + 'source' => array('name', 'label'), ), '#description' => t('A unique machine-readable name for this View. It must only contain lowercase letters, numbers, and underscores.'), ); diff --git a/core/modules/views/views_ui/lib/Drupal/views_ui/ViewCloneFormController.php b/core/modules/views/views_ui/lib/Drupal/views_ui/ViewCloneFormController.php index e5e8b83..d78f89b 100644 --- a/core/modules/views/views_ui/lib/Drupal/views_ui/ViewCloneFormController.php +++ b/core/modules/views/views_ui/lib/Drupal/views_ui/ViewCloneFormController.php @@ -27,21 +27,21 @@ protected function prepareEntity(EntityInterface $entity) { public function form(array $form, array &$form_state, EntityInterface $entity) { parent::form($form, $form_state, $entity); - $form['human_name'] = array( + $form['label'] = array( '#type' => 'textfield', '#title' => t('View name'), '#required' => TRUE, '#size' => 32, '#default_value' => '', '#maxlength' => 255, - '#default_value' => t('Clone of @human_name', array('@human_name' => $entity->label())), + '#default_value' => t('Clone of @label', array('@label' => $entity->label())), ); $form['id'] = array( '#type' => 'machine_name', '#maxlength' => 128, '#machine_name' => array( 'exists' => 'views_get_view', - 'source' => array('human_name'), + 'source' => array('label'), ), '#default_value' => '', '#description' => t('A unique machine-readable name for this View. It must only contain lowercase letters, numbers, and underscores.'),