|
25 | 25 | use Apigee\Edge\Api\Management\Controller\CompanyController as EdgeCompanyController;
|
26 | 26 | use Apigee\Edge\Api\Management\Controller\CompanyControllerInterface as EdgeCompanyControllerInterface;
|
27 | 27 | use Apigee\Edge\Entity\EntityInterface;
|
| 28 | +use Apigee\Edge\Structure\PagerInterface; |
28 | 29 | use Drupal\apigee_edge\Entity\Controller\Cache\AppCacheByOwnerFactoryInterface;
|
29 | 30 | use Drupal\apigee_edge\Entity\Controller\Cache\AppNameCacheByOwnerFactoryInterface;
|
30 | 31 | use Drupal\apigee_edge\Entity\Controller\Cache\EntityCacheInterface;
|
|
38 | 39 | use Drupal\apigee_edge\Entity\DeveloperCompaniesCacheInterface;
|
39 | 40 | use Drupal\apigee_edge\SDKConnectorInterface;
|
40 | 41 | use Drupal\apigee_edge_teams\CompanyMembershipObjectCacheInterface;
|
| 42 | +use Drupal\apigee_edge_teams\Form\TeamAliasForm; |
41 | 43 |
|
42 | 44 | /**
|
43 | 45 | * Definition of the Team controller service.
|
@@ -233,4 +235,25 @@ public function delete(string $entity_id): EntityInterface {
|
233 | 235 | return $entity;
|
234 | 236 | }
|
235 | 237 |
|
| 238 | + /** |
| 239 | + * {@inheritdoc} |
| 240 | + */ |
| 241 | + public function getEntities(PagerInterface $pager = NULL, string $key_provider = 'id'): array { |
| 242 | + $queryparam = []; |
| 243 | + if ($this->orgController->isOrganizationApigeeX()) { |
| 244 | + // Getting the channelId & filter enable check from Config form. |
| 245 | + $channelconfig = \Drupal::config('apigee_edge_teams.team_settings'); |
| 246 | + $channelid = $channelconfig->get('channelid'); |
| 247 | + $channelfilter = $channelconfig->get('enablefilter'); |
| 248 | + if ($channelfilter) { |
| 249 | + $channelid = $channelid ? $channelid : TeamAliasForm::originalChannelId(); |
| 250 | + $queryparam = [ |
| 251 | + 'filter' => 'channelId=' . $channelid |
| 252 | + ]; |
| 253 | + } |
| 254 | + } |
| 255 | + $entities = $this->decorated()->getEntities($pager, $key_provider, $queryparam); |
| 256 | + return $entities; |
| 257 | + } |
| 258 | + |
236 | 259 | }
|
0 commit comments