abstract class UltimenuBase in Ultimenu 8.2
Provides Ultimenu utility methods.
Hierarchy
- class \Drupal\ultimenu\UltimenuBase implements UltimenuInterface uses StringTranslationTrait, UltimenuTrait
Expanded class hierarchy of UltimenuBase
1 string reference to 'UltimenuBase'
1 service uses UltimenuBase
File
- src/
UltimenuBase.php, line 14
Namespace
Drupal\ultimenuView source
abstract class UltimenuBase implements UltimenuInterface {
use StringTranslationTrait;
use UltimenuTrait;
/**
* The entity type manager service.
*
* @var \Drupal\Core\Entity\EntityTypeManagerInterface
*/
protected $entityTypeManager;
/**
* Drupal\Core\Block\BlockManagerInterface.
*
* @var \Drupal\Core\Block\BlockManagerInterface
*/
protected $blockManager;
/**
* Constructs a Ultimenu object.
*/
public function __construct(ConfigFactoryInterface $config_factory, EntityTypeManagerInterface $entity_type_manager, BlockManagerInterface $block_manager) {
$this->configFactory = $config_factory;
$this->entityTypeManager = $entity_type_manager;
$this->blockManager = $block_manager;
}
/**
* {@inheritdoc}
*/
public static function create(ContainerInterface $container) {
return new static($container
->get('config.factory'), $container
->get('entity_type.manager'), $container
->get('plugin.manager.block'));
}
/**
* {@inheritdoc}
*/
public function getEntityTypeManager() {
return $this->entityTypeManager;
}
/**
* {@inheritdoc}
*/
public function getBlockManager() {
return $this->blockManager;
}
}
Members
Name | Modifiers | Type | Description | Overrides |
---|---|---|---|---|
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. | |
UltimenuBase:: |
protected | property | Drupal\Core\Block\BlockManagerInterface. | |
UltimenuBase:: |
protected | property | The entity type manager service. | |
UltimenuBase:: |
public static | function | 2 | |
UltimenuBase:: |
public | function |
Returns the block manager. Overrides UltimenuInterface:: |
|
UltimenuBase:: |
public | function |
Returns the entity type manager. Overrides UltimenuInterface:: |
|
UltimenuBase:: |
public | function | Constructs a Ultimenu object. | 2 |
UltimenuTrait:: |
protected | property | Config Factory Service Object. | |
UltimenuTrait:: |
public | function | ||
UltimenuTrait:: |
public | function | ||
UltimenuTrait:: |
public | function | Return a shortcut for the default theme. |