public static function TestBoldTextBehavior::isApplicable in Paragraphs 8
Returns if the plugin can be used for the provided Paragraphs type.
Parameters
\Drupal\paragraphs\Entity\ParagraphsType $paragraphs_type: The Paragraphs type entity that should be checked.
Return value
bool TRUE if the formatter can be used, FALSE otherwise.
Overrides ParagraphsBehaviorBase::isApplicable
File
- tests/
modules/ paragraphs_test/ src/ Plugin/ paragraphs/ Behavior/ TestBoldTextBehavior.php, line 50
Class
- TestBoldTextBehavior
- Provides a test feature plugin.
Namespace
Drupal\paragraphs_test\Plugin\paragraphs\BehaviorCode
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;
}