public function PlainTextEditor::isCompatible in Drupal 10
Same name and namespace in other branches
- 8 core/modules/quickedit/src/Plugin/InPlaceEditor/PlainTextEditor.php \Drupal\quickedit\Plugin\InPlaceEditor\PlainTextEditor::isCompatible()
- 9 core/modules/quickedit/src/Plugin/InPlaceEditor/PlainTextEditor.php \Drupal\quickedit\Plugin\InPlaceEditor\PlainTextEditor::isCompatible()
File
- core/
modules/ quickedit/ src/ Plugin/ InPlaceEditor/ PlainTextEditor.php, line 20
Class
- PlainTextEditor
- Defines the plain text in-place editor.
Namespace
Drupal\quickedit\Plugin\InPlaceEditorCode
public function isCompatible(FieldItemListInterface $items) {
$field_definition = $items
->getFieldDefinition();
// This editor is incompatible with multivalued fields.
return $field_definition
->getFieldStorageDefinition()
->getCardinality() == 1;
}