You are here

abstract class UltimenuBase in Ultimenu 8.2

Provides Ultimenu utility methods.

Hierarchy

Expanded class hierarchy of UltimenuBase

1 string reference to 'UltimenuBase'
ultimenu.services.yml in ./ultimenu.services.yml
ultimenu.services.yml
1 service uses UltimenuBase
ultimenu.base in ./ultimenu.services.yml
Drupal\ultimenu\UltimenuBase

File

src/UltimenuBase.php, line 14

Namespace

Drupal\ultimenu
View 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

Namesort descending Modifiers Type Description Overrides
StringTranslationTrait::$stringTranslation protected property The string translation service. 1
StringTranslationTrait::formatPlural protected function Formats a string containing a count of items.
StringTranslationTrait::getNumberOfPlurals protected function Returns the number of plurals supported by a given language.
StringTranslationTrait::getStringTranslation protected function Gets the string translation service.
StringTranslationTrait::setStringTranslation public function Sets the string translation service to use. 2
StringTranslationTrait::t protected function Translates a string to the current language or to a given language.
UltimenuBase::$blockManager protected property Drupal\Core\Block\BlockManagerInterface.
UltimenuBase::$entityTypeManager protected property The entity type manager service.
UltimenuBase::create public static function 2
UltimenuBase::getBlockManager public function Returns the block manager. Overrides UltimenuInterface::getBlockManager
UltimenuBase::getEntityTypeManager public function Returns the entity type manager. Overrides UltimenuInterface::getEntityTypeManager
UltimenuBase::__construct public function Constructs a Ultimenu object. 2
UltimenuTrait::$configFactory protected property Config Factory Service Object.
UltimenuTrait::getConfig public function
UltimenuTrait::getSetting public function
UltimenuTrait::getThemeDefault public function Return a shortcut for the default theme.