class ApiDocController in Apigee API Catalog 8
Generic controller for the apidoc entity.
Hierarchy
- class \Drupal\apigee_api_catalog\Controller\ApiDocController implements ContainerInjectionInterface uses StringTranslationTrait
Expanded class hierarchy of ApiDocController
1 file declares its use of ApiDocController
- ApiDocHtmlRouteProvider.php in src/
Entity/ Routing/ ApiDocHtmlRouteProvider.php
File
- src/
Controller/ ApiDocController.php, line 31
Namespace
Drupal\apigee_api_catalog\ControllerView source
class ApiDocController implements ContainerInjectionInterface {
use StringTranslationTrait;
/**
* The entity type manager.
*
* @var \Drupal\Core\Entity\EntityTypeManagerInterface
*/
private $entityTypeManager;
/**
* ApiDocSettingsForm constructor.
*
* @param \Drupal\Core\Entity\EntityTypeManagerInterface $entity_type_manager
* The entity type manager.
*/
public function __construct(EntityTypeManagerInterface $entity_type_manager) {
$this->entityTypeManager = $entity_type_manager;
}
/**
* {@inheritdoc}
*/
public static function create(ContainerInterface $container) {
return new static($container
->get('entity_type.manager'));
}
/**
* Returns the title of this form.
*
* @return \Drupal\Core\StringTranslation\TranslatableMarkup
* The translated title.
*
* @throws \Drupal\Component\Plugin\Exception\PluginNotFoundException
*/
public function title() {
return $this
->t('@label settings', [
'@label' => $this->entityTypeManager
->getDefinition('apidoc')
->getLabel(),
]);
}
}
Members
Name | Modifiers | Type | Description | Overrides |
---|---|---|---|---|
ApiDocController:: |
private | property | The entity type manager. | |
ApiDocController:: |
public static | function |
Instantiates a new instance of this class. Overrides ContainerInjectionInterface:: |
|
ApiDocController:: |
public | function | Returns the title of this form. | |
ApiDocController:: |
public | function | ApiDocSettingsForm constructor. | |
StringTranslationTrait:: |
protected | property | The string translation service. | 1 |
StringTranslationTrait:: |
protected | function | Formats a string containing a count of items. | |
StringTranslationTrait:: |
protected | function | Returns the number of plurals supported by a given language. | |
StringTranslationTrait:: |
protected | function | Gets the string translation service. | |
StringTranslationTrait:: |
public | function | Sets the string translation service to use. | 2 |
StringTranslationTrait:: |
protected | function | Translates a string to the current language or to a given language. |