class TagcloudsTermsBlock in TagCloud 8
Same name in this branch
- 8 src/Plugin/Derivative/TagcloudsTermsBlock.php \Drupal\tagclouds\Plugin\Derivative\TagcloudsTermsBlock
- 8 src/Plugin/Block/TagcloudsTermsBlock.php \Drupal\tagclouds\Plugin\Block\TagcloudsTermsBlock
Same name and namespace in other branches
- 2.0.x src/Plugin/Derivative/TagcloudsTermsBlock.php \Drupal\tagclouds\Plugin\Derivative\TagcloudsTermsBlock
- 1.0.x src/Plugin/Derivative/TagcloudsTermsBlock.php \Drupal\tagclouds\Plugin\Derivative\TagcloudsTermsBlock
Provides dynamic definitions for tagclouds blocks based on Voacabularies.
Hierarchy
- class \Drupal\Component\Plugin\Derivative\DeriverBase implements DeriverInterface
- class \Drupal\tagclouds\Plugin\Derivative\TagcloudsTermsBlock implements DeriverInterface uses StringTranslationTrait
Expanded class hierarchy of TagcloudsTermsBlock
See also
\Drupal\tagclouds\Plugin\Block\TagcloudsTermsBlock
File
- src/
Plugin/ Derivative/ TagcloudsTermsBlock.php, line 16
Namespace
Drupal\tagclouds\Plugin\DerivativeView source
class TagcloudsTermsBlock extends DeriverBase implements DeriverInterface {
use StringTranslationTrait;
/**
* {@inheritdoc}
*/
public function getDerivativeDefinitions($base_plugin_definition) {
foreach (Vocabulary::loadMultiple() as $voc) {
$this->derivatives[$voc
->id()] = $base_plugin_definition;
$this->derivatives[$voc
->id()]['admin_label'] = $this
->t('Tags in @voc', [
'@voc' => $voc
->label(),
]);
}
return parent::getDerivativeDefinitions($base_plugin_definition);
}
}
Members
Name | Modifiers | Type | Description | Overrides |
---|---|---|---|---|
DeriverBase:: |
protected | property | List of derivative definitions. | 1 |
DeriverBase:: |
public | function |
Gets the definition of a derivative plugin. Overrides DeriverInterface:: |
|
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. | |
TagcloudsTermsBlock:: |
public | function |
Gets the definition of all derivatives of a base plugin. Overrides DeriverBase:: |