Commit 6ba9a500 authored by catch's avatar catch

Issue #2208611 by tim.plunkett: Allow subclasses of...

Issue #2208611 by tim.plunkett: Allow subclasses of \Drupal\Core\Entity\Query\QueryBase to override getClass().
parent 6b0b4cfc
...@@ -210,9 +210,7 @@ public function range($start = NULL, $length = NULL) { ...@@ -210,9 +210,7 @@ public function range($start = NULL, $length = NULL) {
* An object holding a group of conditions. * An object holding a group of conditions.
*/ */
protected function conditionGroupFactory($conjunction = 'AND') { protected function conditionGroupFactory($conjunction = 'AND') {
// As the factory classes hardwire QueryBase::getClass, it needs to be $class = static::getClass($this->namespaces, 'Condition');
// hardwired here too.
$class = QueryBase::getClass($this->namespaces, 'Condition');
return new $class($conjunction, $this, $this->namespaces); return new $class($conjunction, $this, $this->namespaces);
} }
......
...@@ -311,7 +311,7 @@ public function __clone() { ...@@ -311,7 +311,7 @@ public function __clone() {
* The object that adds tables and fields to the SQL query object. * The object that adds tables and fields to the SQL query object.
*/ */
public function getTables(SelectInterface $sql_query) { public function getTables(SelectInterface $sql_query) {
$class = QueryBase::getClass($this->namespaces, 'Tables'); $class = static::getClass($this->namespaces, 'Tables');
return new $class($sql_query); return new $class($sql_query);
} }
......
Markdown is supported
0%
or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment