You are here

trait UltimenuTrait in Ultimenu 8.2

A Trait common for Ultimenu split services.

Hierarchy

File

src/UltimenuTrait.php, line 8

Namespace

Drupal\ultimenu
View source
trait UltimenuTrait {

  /**
   * Config Factory Service Object.
   *
   * @var \Drupal\Core\Config\ConfigFactoryInterface
   */
  protected $configFactory;

  /**
   * {@inheritdoc}
   */
  public function getConfig($config = 'ultimenu.settings') {
    return $this->configFactory
      ->get($config);
  }

  /**
   * {@inheritdoc}
   */
  public function getSetting($setting_name = NULL) {
    return $this
      ->getConfig()
      ->get($setting_name);
  }

  /**
   * Return a shortcut for the default theme.
   */
  public function getThemeDefault() {
    return $this->configFactory
      ->get('system.theme')
      ->get('default');
  }

}

Members

Namesort descending Modifiers Type Description Overrides
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.