1 EntityReferenceSelectionHandlerGeneric.inc public EntityReferenceSelectionHandlerGeneric::countReferencableEntities($match = NULL, $match_operator = 'CONTAINS')

Implements EntityReferenceHandler::countReferencableEntities().

Overrides EntityReferenceSelectionHandlerInterface::countReferencableEntities

File

core/modules/entityreference/plugins/selection/EntityReferenceSelectionHandlerGeneric.inc, line 195
Generic Entity handler.

Class

EntityReferenceSelectionHandlerGeneric
@file Generic Entity handler.

Code

public function countReferencableEntities($match = NULL, $match_operator = 'CONTAINS') {
  $query = $this->buildEntityFieldQuery($match, $match_operator);
  return $query
  ->count()
    ->execute();
}