function PhpSelection::countReferenceableEntities
Same name in other branches
- 9 core/lib/Drupal/Core/Entity/Plugin/EntityReferenceSelection/PhpSelection.php \Drupal\Core\Entity\Plugin\EntityReferenceSelection\PhpSelection::countReferenceableEntities()
- 8.9.x core/lib/Drupal/Core/Entity/Plugin/EntityReferenceSelection/PhpSelection.php \Drupal\Core\Entity\Plugin\EntityReferenceSelection\PhpSelection::countReferenceableEntities()
- 11.x core/lib/Drupal/Core/Entity/Plugin/EntityReferenceSelection/PhpSelection.php \Drupal\Core\Entity\Plugin\EntityReferenceSelection\PhpSelection::countReferenceableEntities()
Overrides DefaultSelection::countReferenceableEntities
File
-
core/
lib/ Drupal/ Core/ Entity/ Plugin/ EntityReferenceSelection/ PhpSelection.php, line 67
Class
- PhpSelection
- Defines an alternative to the default Entity Reference Selection plugin.
Namespace
Drupal\Core\Entity\Plugin\EntityReferenceSelectionCode
public function countReferenceableEntities($match = NULL, $match_operator = 'CONTAINS') {
$count = 0;
foreach ($this->getReferenceableEntities($match, $match_operator) as &$items) {
$count += count($items);
}
return $count;
}
Buggy or inaccurate documentation? Please file an issue. Need support? Need help programming? Connect with the Drupal community.