3 namespace Drupal\paragraphs_test\Plugin\paragraphs\Behavior;
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;
12 * Provides a test feature plugin.
14 * @ParagraphsBehavior(
15 * id = "test_dummy_behavior",
16 * label = @Translation("Test dummy plugin"),
17 * description = @Translation("Test dummy plugin"),
21 class TestDummyBehavior extends ParagraphsBehaviorBase {
26 public function view(array &$build, Paragraph $paragraphs_entity, EntityViewDisplayInterface $display, $view_mode) {
27 $build['#attributes']['class'][] = 'dummy_plugin_text';
33 public function buildBehaviorForm(ParagraphInterface $paragraph, array &$form, FormStateInterface $form_state) {
34 // Used to test that returning NULL does not return an error.