protected function DeveloperAppListBuilderForDeveloper::generateCssIdForApp in Apigee Edge 8
Generates a unique CSS id for an app.
Parameters
\Drupal\apigee_edge\Entity\AppInterface $app: App entity.
Return value
string A unique CSS id for the app.
Overrides AppListBuilder::generateCssIdForApp
File
- src/
Entity/ ListBuilder/ DeveloperAppListBuilderForDeveloper.php, line 162
Class
- DeveloperAppListBuilderForDeveloper
- Lists developer apps of a developer on the UI.
Namespace
Drupal\apigee_edge\Entity\ListBuilderCode
protected function generateCssIdForApp(AppInterface $app) : string {
// If we are listing the apps of a developer then developer app name is also
// unique. But this method must return the same CSS id for an app within
// the same page request.
if (!array_key_exists($app
->getName(), $this->appNameCssIdCache)) {
$this->appNameCssIdCache[$app
->getName()] = Html::getUniqueId($app
->getName());
}
return $this->appNameCssIdCache[$app
->getName()];
}