Code Coverage |
||||||||||||||||
Lines |
Branches |
Paths |
Functions and Methods |
Classes and Traits |
||||||||||||
| Total | |
0.00% |
0 / 11 |
|
0.00% |
0 / 2 |
|
0.00% |
0 / 2 |
|
0.00% |
0 / 2 |
CRAP | |
0.00% |
0 / 1 |
| LibrariesPanel | |
0.00% |
0 / 4 |
|
0.00% |
0 / 2 |
|
0.00% |
0 / 2 |
|
0.00% |
0 / 2 |
6 | |
0.00% |
0 / 1 |
| keyboardShortcuts | |
0.00% |
0 / 3 |
|
0.00% |
0 / 1 |
|
0.00% |
0 / 1 |
|
0.00% |
0 / 1 |
2 | |||
| build | |
0.00% |
0 / 1 |
|
0.00% |
0 / 1 |
|
0.00% |
0 / 1 |
|
0.00% |
0 / 1 |
2 | |||
| 1 | <?php |
| 2 | |
| 3 | declare(strict_types=1); |
| 4 | |
| 5 | namespace Drupal\display_builder\Plugin\display_builder\Island; |
| 6 | |
| 7 | use Drupal\Core\StringTranslation\TranslatableMarkup; |
| 8 | use Drupal\display_builder\Attribute\Island; |
| 9 | use Drupal\display_builder\InstanceInterface; |
| 10 | use Drupal\display_builder\IslandPluginBase; |
| 11 | use Drupal\display_builder\IslandType; |
| 12 | |
| 13 | /** |
| 14 | * Layers island plugin implementation. |
| 15 | */ |
| 16 | #[Island( |
| 17 | id: 'library', |
| 18 | enabled_by_default: TRUE, |
| 19 | label: new TranslatableMarkup('Libraries'), |
| 20 | description: new TranslatableMarkup('Pick elements from libraries and drop them in the display.'), |
| 21 | type: IslandType::View, |
| 22 | icon: 'collection', |
| 23 | )] |
| 24 | class LibrariesPanel extends IslandPluginBase { |
| 25 | |
| 26 | /** |
| 27 | * {@inheritdoc} |
| 28 | */ |
| 29 | public static function keyboardShortcuts(): array { |
| 30 | return [ |
| 31 | 'l' => t('Show the libraries'), |
| 32 | ]; |
| 33 | } |
| 34 | |
| 35 | /** |
| 36 | * {@inheritdoc} |
| 37 | */ |
| 38 | public function build(InstanceInterface $builder, array $data = [], array $options = []): array { |
| 39 | // @todo Move the logic here. |
| 40 | // @see https://www.drupal.org/project/display_builder/issues/3542866 |
| 41 | return []; |
| 42 | } |
| 43 | |
| 44 | } |