diff --git a/core/lib/Drupal/Core/Annotation/ContextDefinition.php b/core/lib/Drupal/Core/Annotation/ContextDefinition.php index 987bab95..75fbc9b 100644 --- a/core/lib/Drupal/Core/Annotation/ContextDefinition.php +++ b/core/lib/Drupal/Core/Annotation/ContextDefinition.php @@ -100,7 +100,7 @@ public function __construct(array $values) { // used in the classes they pass to. foreach (['label', 'description'] as $key) { // @todo Remove this workaround in https://www.drupal.org/node/2362727. - if (isset($values[$key]) && $values[$key] instanceof TranslationWrapper) { + if (isset($values[$key]) && $values[$key]->get() instanceof TranslationWrapper) { $values[$key] = (string) $values[$key]->get(); } else { diff --git a/core/lib/Drupal/Core/Plugin/ContextAwarePluginAssignmentTrait.php b/core/lib/Drupal/Core/Plugin/ContextAwarePluginAssignmentTrait.php index 19d756c..3766c23 100644 --- a/core/lib/Drupal/Core/Plugin/ContextAwarePluginAssignmentTrait.php +++ b/core/lib/Drupal/Core/Plugin/ContextAwarePluginAssignmentTrait.php @@ -61,6 +61,7 @@ protected function addContextAssignmentElement(ContextAwarePluginInterface $plug '#options' => $options, '#required' => $definition->isRequired(), '#default_value' => !empty($assignments[$context_slot]) ? $assignments[$context_slot] : '', + '#description' => $definition->getDescription(), ]; } } diff --git a/core/modules/aggregator/src/Plugin/Block/AggregatorFeedBlock.php b/core/modules/aggregator/src/Plugin/Block/AggregatorFeedBlock.php index 7272d7f..62d1344 100644 --- a/core/modules/aggregator/src/Plugin/Block/AggregatorFeedBlock.php +++ b/core/modules/aggregator/src/Plugin/Block/AggregatorFeedBlock.php @@ -24,7 +24,7 @@ * admin_label = @Translation("Aggregator feed"), * category = @Translation("Lists (Views)"), * context = { - * "feed" = @ContextDefinition("entity:aggregator_feed", label = @Translation("Aggregator feed")) + * "feed" = @ContextDefinition("entity:aggregator_feed", label = @Translation("Aggregator feed"), description = @Translation("Select the feed that should be displayed")) * } * ) *