You are here

class SmartmenusUtil in Smartmenus.js 8

Class SmartmenusUtil @package Drupal\smartmenus

Hierarchy

Expanded class hierarchy of SmartmenusUtil

2 files declare their use of SmartmenusUtil
SmartMenusBlock.php in src/Plugin/Block/SmartMenusBlock.php
SmartmenusSettingsForm.php in src/Form/SmartmenusSettingsForm.php
1 string reference to 'SmartmenusUtil'
smartmenus.services.yml in ./smartmenus.services.yml
smartmenus.services.yml
1 service uses SmartmenusUtil
smartmenus.util in ./smartmenus.services.yml
Drupal\smartmenus\SmartmenusUtil

File

src/SmartmenusUtil.php, line 11

Namespace

Drupal\smartmenus
View source
class SmartmenusUtil {

  /**
   * @var TranslationManager
   */
  protected $translation;

  /**
   * SmartmenusUtil constructor.
   * @param TranslationManager $translation
   */
  public function __construct(TranslationManager $translation) {
    $this->translation = $translation;
  }

  /**
   * @return array|string
   * Returns a list of themes supported by the Smartmenus plugin.
   */
  public function getAvailableMenuThemesList() : array {
    return [
      '' => $this->translation
        ->translate('None'),
      'sm-blue' => $this->translation
        ->translate('Blue'),
      'sm-clean' => $this->translation
        ->translate('Clean'),
      'sm-mint' => $this->translation
        ->translate('Mint'),
      'sm-simple' => $this->translation
        ->translate('Simple'),
    ];
  }

  /**
   * @return string
   */
  public function getConfigFormSettingsName() : string {
    return 'smartmenus.smartmenussettings';
  }

}

Members