Provides a test feature plugin.
@ParagraphsBehavior(
id = "test_dummy_behavior",
label = @Translation("Test dummy plugin"),
description = @Translation("Test dummy plugin"),
weight = 2
)
Expanded class hierarchy of TestDummyBehavior
class TestDummyBehavior extends ParagraphsBehaviorBase {
/**
* {@inheritdoc}
*/
public function view(array &$build, Paragraph $paragraphs_entity, EntityViewDisplayInterface $display, $view_mode) {
$build['#attributes']['class'][] = 'dummy_plugin_text';
}
/**
* {@inheritdoc}
*/
public function buildBehaviorForm(ParagraphInterface $paragraph, array &$form, FormStateInterface $form_state) {
// Used to test that returning NULL does not return an error.
return NULL;
}
}