class Image in Drupal 10
Same name in this branch
- 10 core/lib/Drupal/Core/Image/Image.php \Drupal\Core\Image\Image
- 10 core/lib/Drupal/Component/Utility/Image.php \Drupal\Component\Utility\Image
- 10 core/modules/quickedit/src/Plugin/InPlaceEditor/Image.php \Drupal\quickedit\Plugin\InPlaceEditor\Image
- 10 core/modules/media/src/Plugin/media/Source/Image.php \Drupal\media\Plugin\media\Source\Image
Defines the image text in-place editor.
Plugin annotation
@InPlaceEditor(
id = "image"
)
Hierarchy
- class \Drupal\Component\Plugin\PluginBase implements DerivativeInspectionInterface, PluginInspectionInterface
- class \Drupal\Core\Plugin\PluginBase uses DependencySerializationTrait, MessengerTrait, StringTranslationTrait
- class \Drupal\quickedit\Plugin\InPlaceEditorBase implements InPlaceEditorInterface
- class \Drupal\quickedit\Plugin\InPlaceEditor\Image
- class \Drupal\quickedit\Plugin\InPlaceEditorBase implements InPlaceEditorInterface
- class \Drupal\Core\Plugin\PluginBase uses DependencySerializationTrait, MessengerTrait, StringTranslationTrait
Expanded class hierarchy of Image
28 string references to 'Image'
- ckeditor5.ckeditor5.yml in core/
modules/ ckeditor5/ ckeditor5.ckeditor5.yml - core/modules/ckeditor5/ckeditor5.ckeditor5.yml
- ContentEntityTest::testMediaSource in core/
modules/ migrate_drupal/ tests/ src/ Kernel/ Plugin/ migrate/ source/ ContentEntityTest.php - Tests media source plugin.
- drupal6.php in core/
modules/ migrate_drupal/ tests/ fixtures/ drupal6.php - A database agnostic dump for testing purposes.
- DrupalImage::getButtons in core/
modules/ ckeditor/ src/ Plugin/ CKEditorPlugin/ DrupalImage.php - EditorImageDialog::buildForm in core/
modules/ editor/ src/ Form/ EditorImageDialog.php
File
- core/
modules/ quickedit/ src/ Plugin/ InPlaceEditor/ Image.php, line 15
Namespace
Drupal\quickedit\Plugin\InPlaceEditorView source
class Image extends InPlaceEditorBase {
/**
* {@inheritdoc}
*/
public function isCompatible(FieldItemListInterface $items) {
$field_definition = $items
->getFieldDefinition();
// This editor is only compatible with single-value image fields.
return $field_definition
->getFieldStorageDefinition()
->getCardinality() === 1 && $field_definition
->getType() === 'image';
}
/**
* {@inheritdoc}
*/
public function getAttachments() {
return [
'library' => [
'quickedit/quickedit.inPlaceEditor.image',
],
];
}
}