Support for Drupal 7 is ending on 5 January 2025—it’s time to migrate to Drupal 10! Learn about the many benefits of Drupal 10 and find migration tools in our resource center.
class OgSelectionHandler extends EntityReference_SelectionHandler_Generic {
[ ... ]
public function buildEntityFieldQuery($match = NULL, $match_operator = 'CONTAINS') {
global $user;
$handler = EntityReference_SelectionHandler_Generic::getInstance($this->field, $this->instance, $this->entity_type, $this->entity);
$query = $handler->buildEntityFieldQuery($match, $match_operator);
Given the class inherits from EntityReference_SelectionHandler_Generic, and AFAIK doesn't change its properties that were set in the constructor, would it not be simpler, quicker, and easier to read to call parent::buildEntityFieldQuery() rather than obtain an instance?
Comment | File | Size | Author |
---|---|---|---|
#2 | 2218775-og-selection-handler-clean-2.patch | 1.95 KB | amitaibu |
#1 | 2218775.og_.parent-buildEntityFieldQuery.patch | 880 bytes | joachim |
Comments
Comment #1
joachim CreditAttribution: joachim commentedLet's see how this tests...
Comment #2
amitaibuThanks. Lets try to clean more cruft.
Comment #3
joachim CreditAttribution: joachim commentedOh I filed a separate issue for that one... #2218777: restore entityFieldQueryAlter()