protected function DeveloperAppListBuilderForDeveloper::buildEntityIdQuery in Apigee Edge 8
Builds an entity query used by entity listing.
Return value
\Drupal\Core\Entity\Query\QueryInterface The entity query.
Overrides EdgeEntityListBuilder::buildEntityIdQuery
File
- src/
Entity/ ListBuilder/ DeveloperAppListBuilderForDeveloper.php, line 128
Class
- DeveloperAppListBuilderForDeveloper
- Lists developer apps of a developer on the UI.
Namespace
Drupal\apigee_edge\Entity\ListBuilderCode
protected function buildEntityIdQuery() : QueryInterface {
$query = parent::buildEntityIdQuery();
$user = $this->routeMatch
->getParameter('user');
$developer_id = $user
->get('apigee_edge_developer_id')->value;
// If developer id can not be retrieved for a Drupal user it means that
// either there is connection error or the site is out of sync with
// Apigee Edge.
if ($developer_id === NULL) {
throw new DeveloperDoesNotExistException($user
->getEmail());
}
$query
->condition('developerId', $developer_id);
return $query;
}