Upgraded imagemagick and manually altered pdf to image module to handle changes....
[yaffs-website] / web / modules / contrib / paragraphs / tests / modules / paragraphs_test / src / Plugin / paragraphs / Behavior / TestDummyBehavior.php
1 <?php
2
3 namespace Drupal\paragraphs_test\Plugin\paragraphs\Behavior;
4
5 use Drupal\Core\Entity\Display\EntityViewDisplayInterface;
6 use Drupal\Core\Form\FormStateInterface;
7 use Drupal\paragraphs\Entity\Paragraph;
8 use Drupal\paragraphs\ParagraphInterface;
9 use Drupal\paragraphs\ParagraphsBehaviorBase;
10
11 /**
12  * Provides a test feature plugin.
13  *
14  * @ParagraphsBehavior(
15  *   id = "test_dummy_behavior",
16  *   label = @Translation("Test dummy plugin"),
17  *   description = @Translation("Test dummy plugin"),
18  *   weight = 2
19  * )
20  */
21 class TestDummyBehavior extends ParagraphsBehaviorBase {
22
23   /**
24    * {@inheritdoc}
25    */
26   public function view(array &$build, Paragraph $paragraphs_entity, EntityViewDisplayInterface $display, $view_mode) {
27     $build['#attributes']['class'][] = 'dummy_plugin_text';
28   }
29
30   /**
31    * {@inheritdoc}
32    */
33   public function buildBehaviorForm(ParagraphInterface $paragraph, array &$form, FormStateInterface $form_state) {
34     // Used to test that returning NULL does not return an error.
35     return NULL;
36   }
37 }