X-Git-Url: http://www.aleph1.co.uk/gitweb/?p=yaffs-website;a=blobdiff_plain;f=web%2Fmodules%2Fcontrib%2Fparagraphs%2Ftests%2Fmodules%2Fparagraphs_test%2Fsrc%2FPlugin%2Fparagraphs%2FBehavior%2FTestBoldTextBehavior.php;fp=web%2Fmodules%2Fcontrib%2Fparagraphs%2Ftests%2Fmodules%2Fparagraphs_test%2Fsrc%2FPlugin%2Fparagraphs%2FBehavior%2FTestBoldTextBehavior.php;h=0000000000000000000000000000000000000000;hp=5c5d653114def3c72de13d361fb0bde0a8e6db29;hb=059867c3f96750652c80f39e44c442a58c2549ee;hpb=f8fc16ae6b862bef59baaad5d051dd37b7ff11b2 diff --git a/web/modules/contrib/paragraphs/tests/modules/paragraphs_test/src/Plugin/paragraphs/Behavior/TestBoldTextBehavior.php b/web/modules/contrib/paragraphs/tests/modules/paragraphs_test/src/Plugin/paragraphs/Behavior/TestBoldTextBehavior.php deleted file mode 100644 index 5c5d65311..000000000 --- a/web/modules/contrib/paragraphs/tests/modules/paragraphs_test/src/Plugin/paragraphs/Behavior/TestBoldTextBehavior.php +++ /dev/null @@ -1,66 +0,0 @@ - 'checkbox', - '#title' => $this->t('Bold Text'), - '#default_value' => $paragraph->getBehaviorSetting($this->getPluginId(), 'bold_text', FALSE), - '#description' => $this->t("Bold text for the paragraph."), - ]; - return $form; - } - - /** - * {@inheritdoc} - */ - public function view(array &$build, Paragraph $paragraphs_entity, EntityViewDisplayInterface $display, $view_mode) { - if ($paragraphs_entity->getBehaviorSetting($this->getPluginId(), 'bold_text')) { - $build['#attributes']['class'][] = 'bold_plugin_text'; - $build['#attached']['library'][] = 'paragraphs_test/drupal.paragraphs_test.bold_text'; - } - } - - /** - * {@inheritdoc} - */ - public static function isApplicable(ParagraphsType $paragraphs_type) { - // If the name of the field is not text_paragraph_test then allow using this - // plugin. - if ($paragraphs_type->id() != 'text_paragraph_test') { - return TRUE; - } - return FALSE; - } - - /** - * {@inheritdoc} - */ - public function settingsSummary(Paragraph $paragraph) { - $bold_setting = $paragraph->getBehaviorSetting($this->getPluginId(), 'bold_text'); - return [$bold_setting ? $this->t('Bold: Yes') : $this->t('Bold: No')]; - } -}