You are here

public function EntityReference_SelectionHandler_Generic::countReferencableEntities in Entity reference 7

Implements EntityReferenceHandler::countReferencableEntities().

Overrides EntityReference_SelectionHandler::countReferencableEntities

File

plugins/selection/EntityReference_SelectionHandler_Generic.class.php, line 183

Class

EntityReference_SelectionHandler_Generic
A generic Entity handler.

Code

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