You are here

function UserRole::attributeDescription in Fasttoggle 8.2

Return the description for the attribute being displayed.

Return value

TranslatableMarkup? The attribute description.

1 call to UserRole::attributeDescription()
UserRole::settingForm in src/Plugin/Setting/UserRole.php
Return the sitewide form element for this setting.

File

src/Plugin/Setting/UserRole.php, line 95
Fasttoggle User Status

Class

UserRole
Abstract interface for settings. Plugin strings are used for quick filtering without the need to instantiate the class.

Namespace

Drupal\fasttoggle\Plugin\Setting

Code

function attributeDescription($attributeName) {

  // Strip off "user_" from the front.
  $attribute = $this->attributes[substr($attributeName, 11)];
  $definition = $this
    ->getPluginDefinition();
  return t($definition['description_template'], [
    '@rolename' => $attribute,
  ]);
}