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 d9cd6722b30a9418b2e6fd7023dde8d6c282a3d9..d1e19f55a2861c747549906bd81cb037eb46e5ce 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 fdfe8d985bed5ed9c865c9cc7cdbeacfc06f8665..cdb3786ff0715141395bc378e64c9635aeecb869 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 77927e75e1185ae2d47ec25393eb61c4773a6ce1..e69e2f7c0badab2256327fbb4448d71265985077 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 @@ protected function renderItems($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 f01a62f25f242bf61bfd31c94715f29bc472d4bf..8327bcf7f4a6f669984962fe6e52ce6a18db6aeb 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 066742b3840b8ee6b7b4ff5bf28f57bb07e205ec..5df44528233fedcc9d2f3a4f9e9b60ed5cf2f712 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/system/lib/Drupal/system/Plugin/views/field/BulkFormBase.php b/core/modules/system/lib/Drupal/system/Plugin/views/field/BulkFormBase.php index 4bc26dd76483aab77e5637ddcead55e828684495..e61c3998f6b17f6165f573d751fc7abb317e31b7 100644 --- a/core/modules/system/lib/Drupal/system/Plugin/views/field/BulkFormBase.php +++ b/core/modules/system/lib/Drupal/system/Plugin/views/field/BulkFormBase.php @@ -143,7 +143,7 @@ public function views_form_submit(&$form, &$form_state) { $selected = array_filter($form_state['values'][$this->options['id']]); $entities = array(); foreach (array_intersect_key($this->view->result, $selected) as $row) { - $entity = $this->get_entity($row); + $entity = $this->getEntity($row); $entities[$entity->id()] = $entity; } 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 618b6aeaf7b1d3b4019f0fe9a8e0f6899d0a9e72..84f3d78bfe6affbba9bc55d50947c03c03347fc5 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 20f68e82ece74e051aa5b1dad6d504eb325d2ee1..6e143b7fad28b2a18f98485296a9296d05552a65 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 b94bdbe1f8b22645b31adaed90e7839dbe1679a9..13edb18d620dce6b3a54bcdb5cc950cf1e1021b9 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 6655d6a547b3a4c5515b3dba7d3c38db4b67eeaa..fa26d7d509446f165a387d89b6073de976eead55 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 87b4fbdf9904cad318ac6fc4c654bb938286482d..095018072f26c303094378e5faaf73597539426b 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.'); }