public function QueryFactory::get in CiviCRM Entity 8.3
Instantiates an entity query for a given entity type.
Parameters
\Drupal\Core\Entity\EntityTypeInterface $entity_type: The entity type definition.
string $conjunction: The operator to use to combine conditions: 'AND' or 'OR'.
Return value
\Drupal\Core\Entity\Query\QueryInterface An entity query for a specific configuration entity type.
Overrides QueryFactoryInterface::get
File
- src/
Entity/ Query/ CiviCRM/ QueryFactory.php, line 46
Class
- QueryFactory
- Factory class creating entity query objects in CiviCRM.
Namespace
Drupal\civicrm_entity\Entity\Query\CiviCRMCode
public function get(EntityTypeInterface $entity_type, $conjunction) {
// @todo copy paste, evaluate if they do.
if ($conjunction == 'OR') {
throw new QueryException("CiviCRM entity queries do not support OR conditions.");
}
$class = QueryBase::getClass($this->namespaces, 'Query');
return new $class($entity_type, $conjunction, $this->namespaces, $this->civicrmApi);
}