diff --git a/core/modules/action/lib/Drupal/action/Plugin/views/field/BulkForm.php b/core/modules/action/lib/Drupal/action/Plugin/views/field/BulkForm.php index 83f93b9..9e6c083 100644 --- a/core/modules/action/lib/Drupal/action/Plugin/views/field/BulkForm.php +++ b/core/modules/action/lib/Drupal/action/Plugin/views/field/BulkForm.php @@ -112,7 +112,7 @@ public function views_form_submit(&$form, &$form_state) { if (!empty($selected)) { foreach (array_keys($selected) as $row_index) { - $entity = $this->get_entity($this->view->result[$row_index]); + $entity = $this->getEntity($this->view->result[$row_index]); actions_do($action->aid, $entity); $entity->save(); $count++; diff --git a/core/modules/comment/lib/Drupal/comment/Plugin/views/field/Link.php b/core/modules/comment/lib/Drupal/comment/Plugin/views/field/Link.php index d9cd672..d1e19f5 100644 --- a/core/modules/comment/lib/Drupal/comment/Plugin/views/field/Link.php +++ b/core/modules/comment/lib/Drupal/comment/Plugin/views/field/Link.php @@ -43,7 +43,7 @@ public function buildOptionsForm(&$form, &$form_state) { public function query() {} function render($values) { - $comment = $this->get_entity($values); + $comment = $this->getEntity($values); return $this->render_link($comment, $values); } diff --git a/core/modules/comment/lib/Drupal/comment/Plugin/views/field/NodeLink.php b/core/modules/comment/lib/Drupal/comment/Plugin/views/field/NodeLink.php index fdfe8d9..cdb3786 100644 --- a/core/modules/comment/lib/Drupal/comment/Plugin/views/field/NodeLink.php +++ b/core/modules/comment/lib/Drupal/comment/Plugin/views/field/NodeLink.php @@ -39,7 +39,7 @@ public function buildOptionsForm(&$form, &$form_state) { public function query() {} function render($values) { - $node = $this->get_entity($values); + $node = $this->getEntity($values); comment_node_view($node, $this->options['teaser'] ? 'teaser' : 'full'); // Only render the links if they are defined. diff --git a/core/modules/field/lib/Drupal/field/Plugin/views/field/Field.php b/core/modules/field/lib/Drupal/field/Plugin/views/field/Field.php index 2abe98d..ca38864 100644 --- a/core/modules/field/lib/Drupal/field/Plugin/views/field/Field.php +++ b/core/modules/field/lib/Drupal/field/Plugin/views/field/Field.php @@ -644,7 +644,7 @@ function render_items($items) { * Return an array of items for the field. */ function get_items($values) { - $original_entity = $this->get_entity($values); + $original_entity = $this->getEntity($values); if (!$original_entity) { return array(); } diff --git a/core/modules/node/lib/Drupal/node/Plugin/views/field/Link.php b/core/modules/node/lib/Drupal/node/Plugin/views/field/Link.php index 266bedf..216a5ee 100644 --- a/core/modules/node/lib/Drupal/node/Plugin/views/field/Link.php +++ b/core/modules/node/lib/Drupal/node/Plugin/views/field/Link.php @@ -46,7 +46,7 @@ public function query() { } function render($values) { - if ($entity = $this->get_entity($values)) { + if ($entity = $this->getEntity($values)) { return $this->render_link($entity, $values); } } diff --git a/core/modules/translation_entity/lib/Drupal/translation_entity/Plugin/views/field/TranslationLink.php b/core/modules/translation_entity/lib/Drupal/translation_entity/Plugin/views/field/TranslationLink.php index 618b6ae..84f3d78 100644 --- a/core/modules/translation_entity/lib/Drupal/translation_entity/Plugin/views/field/TranslationLink.php +++ b/core/modules/translation_entity/lib/Drupal/translation_entity/Plugin/views/field/TranslationLink.php @@ -45,7 +45,7 @@ public function buildOptionsForm(&$form, &$form_state) { * Overrides \Drupal\views\Plugin\views\field\FieldPluginBase::render(). */ function render($values) { - return $this->render_link($this->get_entity($values), $values); + return $this->render_link($this->getEntity($values), $values); } /** diff --git a/core/modules/user/lib/Drupal/user/Plugin/views/field/Link.php b/core/modules/user/lib/Drupal/user/Plugin/views/field/Link.php index 39b2a9b..1c48ddc 100644 --- a/core/modules/user/lib/Drupal/user/Plugin/views/field/Link.php +++ b/core/modules/user/lib/Drupal/user/Plugin/views/field/Link.php @@ -60,7 +60,7 @@ public function query() { * Overrides \Drupal\views\Plugin\views\field\FieldPluginBase::render(). */ function render($values) { - return $this->render_link($this->get_entity($values), $values); + return $this->render_link($this->getEntity($values), $values); } /** diff --git a/core/modules/user/lib/Drupal/user/Plugin/views/field/User.php b/core/modules/user/lib/Drupal/user/Plugin/views/field/User.php index 614d201..ddd005e 100644 --- a/core/modules/user/lib/Drupal/user/Plugin/views/field/User.php +++ b/core/modules/user/lib/Drupal/user/Plugin/views/field/User.php @@ -52,7 +52,7 @@ public function buildOptionsForm(&$form, &$form_state) { } function render_link($data, $values) { - if (!empty($this->options['link_to_user']) && user_access('access user profiles') && ($entity = $this->get_entity($values)) && $data !== NULL && $data !== '') { + if (!empty($this->options['link_to_user']) && user_access('access user profiles') && ($entity = $this->getEntity($values)) && $data !== NULL && $data !== '') { $this->options['alter']['make_link'] = TRUE; $uri = $entity->uri(); $this->options['alter']['path'] = $uri['path']; diff --git a/core/modules/views/lib/Drupal/views/Plugin/views/field/FieldPluginBase.php b/core/modules/views/lib/Drupal/views/Plugin/views/field/FieldPluginBase.php index e4501f8..76c6305 100644 --- a/core/modules/views/lib/Drupal/views/Plugin/views/field/FieldPluginBase.php +++ b/core/modules/views/lib/Drupal/views/Plugin/views/field/FieldPluginBase.php @@ -367,7 +367,7 @@ public function elementWrapperClasses($row_index = NULL) { * @return \Drupal\Core\Entity\EntityInterface * Returns the entity matching the values. */ - public function get_entity(\stdClass $values) { + public function getEntity(\stdClass $values) { $relationship_id = $this->options['relationship']; if ($relationship_id == 'none') { return $values->_entity; diff --git a/core/modules/views/lib/Drupal/views/Tests/Entity/FieldEntityTest.php b/core/modules/views/lib/Drupal/views/Tests/Entity/FieldEntityTest.php index 87b4fbd..28bb990 100644 --- a/core/modules/views/lib/Drupal/views/Tests/Entity/FieldEntityTest.php +++ b/core/modules/views/lib/Drupal/views/Tests/Entity/FieldEntityTest.php @@ -55,13 +55,13 @@ public function testGetEntity() { $row = $view->result[0]; // Tests entities on the base level. - $entity = $view->field['cid']->get_entity($row); + $entity = $view->field['cid']->getEntity($row); $this->assertEqual($entity->id(), $comment->id(), 'Make sure the right comment entity got loaded.'); // Tests entities as relationship on first level. - $entity = $view->field['nid']->get_entity($row); + $entity = $view->field['nid']->getEntity($row); $this->assertEqual($entity->id(), $node->id(), 'Make sure the right node entity got loaded.'); // Tests entities as relationships on second level. - $entity = $view->field['uid']->get_entity($row); + $entity = $view->field['uid']->getEntity($row); $this->assertEqual($entity->id(), $account->id(), 'Make sure the right user entity got loaded.'); }