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 c29c031..c9e3bfe 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. */ public function getItems($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 f01a62f..8327bcf 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/node/lib/Drupal/node/Plugin/views/field/RevisionLink.php b/core/modules/node/lib/Drupal/node/Plugin/views/field/RevisionLink.php index 066742b..5df4452 100644 --- a/core/modules/node/lib/Drupal/node/Plugin/views/field/RevisionLink.php +++ b/core/modules/node/lib/Drupal/node/Plugin/views/field/RevisionLink.php @@ -67,7 +67,7 @@ function render_link($data, $values) { */ function get_revision_entity($values, $op) { $vid = $this->getValue($values, 'node_vid'); - $node = $this->get_entity($values); + $node = $this->getEntity($values); // Unpublished nodes ignore access control. $node->status = 1; // Ensure user has access to perform the operation on this node. 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 20f68e8..6e143b7 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 b94bdbe..13edb18 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 8019cf6..3538cbb 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..0950180 100644 --- a/core/modules/views/lib/Drupal/views/Tests/Entity/FieldEntityTest.php +++ b/core/modules/views/lib/Drupal/views/Tests/Entity/FieldEntityTest.php @@ -37,7 +37,7 @@ public static function getInfo() { } /** - * Tests the get_entity method. + * Tests the getEntity method. */ public function testGetEntity() { // The view is a view of comments, their nodes and their authors, so there @@ -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.'); }