public function DefaultSelection::countReferenceableEntities in Zircon Profile 8
Same name and namespace in other branches
- 8.0 core/lib/Drupal/Core/Entity/Plugin/EntityReferenceSelection/DefaultSelection.php \Drupal\Core\Entity\Plugin\EntityReferenceSelection\DefaultSelection::countReferenceableEntities()
Counts entities that are referenceable.
Return value
int The number of referenceable entities.
Overrides SelectionInterface::countReferenceableEntities
1 method overrides DefaultSelection::countReferenceableEntities()
- PhpSelection::countReferenceableEntities in core/
lib/ Drupal/ Core/ Entity/ Plugin/ EntityReferenceSelection/ PhpSelection.php - Counts entities that are referenceable.
File
- core/
lib/ Drupal/ Core/ Entity/ Plugin/ EntityReferenceSelection/ DefaultSelection.php, line 269 - Contains \Drupal\Core\Entity\Plugin\EntityReferenceSelection\DefaultSelection.
Class
- DefaultSelection
- Default plugin implementation of the Entity Reference Selection plugin.
Namespace
Drupal\Core\Entity\Plugin\EntityReferenceSelectionCode
public function countReferenceableEntities($match = NULL, $match_operator = 'CONTAINS') {
$query = $this
->buildEntityQuery($match, $match_operator);
return $query
->count()
->execute();
}