Code Coverage |
||||||||||||||||
Lines |
Branches |
Paths |
Functions and Methods |
Classes and Traits |
||||||||||||
| Total | |
0.00% |
0 / 7 |
n/a |
0 / 0 |
n/a |
0 / 0 |
|
0.00% |
0 / 1 |
CRAP | |
0.00% |
0 / 1 |
||
| ViewHeaderSource | |
0.00% |
0 / 1 |
n/a |
0 / 0 |
n/a |
0 / 0 |
|
0.00% |
0 / 1 |
2 | |
0.00% |
0 / 1 |
||
| setVariableId | |
0.00% |
0 / 1 |
n/a |
0 / 0 |
n/a |
0 / 0 |
|
0.00% |
0 / 1 |
2 | |||||
| 1 | <?php |
| 2 | |
| 3 | declare(strict_types=1); |
| 4 | |
| 5 | namespace Drupal\display_builder_views\Plugin\UiPatterns\Source; |
| 6 | |
| 7 | use Drupal\Core\StringTranslation\TranslatableMarkup; |
| 8 | use Drupal\display_builder_views\Plugin\ViewsUiPatternsSourceBase; |
| 9 | use Drupal\ui_patterns\Attribute\Source; |
| 10 | |
| 11 | /** |
| 12 | * Plugin implementation of the source for views. |
| 13 | */ |
| 14 | #[Source( |
| 15 | id: 'view_header', |
| 16 | label: new TranslatableMarkup('[View] Header'), |
| 17 | context_requirements: ['views:style'], |
| 18 | prop_types: ['slot'], |
| 19 | tags: ['views'], |
| 20 | )] |
| 21 | class ViewHeaderSource extends ViewsUiPatternsSourceBase { |
| 22 | |
| 23 | /** |
| 24 | * {@inheritdoc} |
| 25 | */ |
| 26 | public static function setVariableId(): string { |
| 27 | return 'header'; |
| 28 | } |
| 29 | |
| 30 | } |