class Image
Same name in this branch
- 8.9.x core/modules/media/src/Plugin/media/Source/Image.php \Drupal\media\Plugin\media\Source\Image
- 8.9.x core/lib/Drupal/Core/Image/Image.php \Drupal\Core\Image\Image
- 8.9.x core/lib/Drupal/Component/Utility/Image.php \Drupal\Component\Utility\Image
Same name in other branches
- 9 core/modules/media/src/Plugin/media/Source/Image.php \Drupal\media\Plugin\media\Source\Image
- 9 core/modules/ckeditor5/src/Plugin/CKEditor5Plugin/Image.php \Drupal\ckeditor5\Plugin\CKEditor5Plugin\Image
- 9 core/modules/quickedit/src/Plugin/InPlaceEditor/Image.php \Drupal\quickedit\Plugin\InPlaceEditor\Image
- 9 core/modules/image/src/Plugin/InPlaceEditor/Image.php \Drupal\image\Plugin\InPlaceEditor\Image
- 9 core/lib/Drupal/Core/Image/Image.php \Drupal\Core\Image\Image
- 9 core/lib/Drupal/Component/Utility/Image.php \Drupal\Component\Utility\Image
- 10 core/modules/media/src/Plugin/media/Source/Image.php \Drupal\media\Plugin\media\Source\Image
- 10 core/modules/ckeditor5/src/Plugin/CKEditor5Plugin/Image.php \Drupal\ckeditor5\Plugin\CKEditor5Plugin\Image
- 10 core/lib/Drupal/Core/Image/Image.php \Drupal\Core\Image\Image
- 10 core/lib/Drupal/Component/Utility/Image.php \Drupal\Component\Utility\Image
- 11.x core/modules/media/src/Plugin/media/Source/Image.php \Drupal\media\Plugin\media\Source\Image
- 11.x core/modules/ckeditor5/src/Plugin/CKEditor5Plugin/Image.php \Drupal\ckeditor5\Plugin\CKEditor5Plugin\Image
- 11.x core/lib/Drupal/Core/Image/Image.php \Drupal\Core\Image\Image
- 11.x core/lib/Drupal/Component/Utility/Image.php \Drupal\Component\Utility\Image
Defines the image text in-place editor.
Plugin annotation
@InPlaceEditor(
id = "image"
)
Hierarchy
- class \Drupal\Component\Plugin\PluginBase implements \Drupal\Component\Plugin\PluginInspectionInterface, \Drupal\Component\Plugin\DerivativeInspectionInterface
- class \Drupal\Core\Plugin\PluginBase extends \Drupal\Component\Plugin\PluginBase uses \Drupal\Core\StringTranslation\StringTranslationTrait, \Drupal\Core\DependencyInjection\DependencySerializationTrait, \Drupal\Core\Messenger\MessengerTrait
- class \Drupal\quickedit\Plugin\InPlaceEditorBase extends \Drupal\Core\Plugin\PluginBase implements \Drupal\quickedit\Plugin\InPlaceEditorInterface
- class \Drupal\image\Plugin\InPlaceEditor\Image extends \Drupal\quickedit\Plugin\InPlaceEditorBase
- class \Drupal\quickedit\Plugin\InPlaceEditorBase extends \Drupal\Core\Plugin\PluginBase implements \Drupal\quickedit\Plugin\InPlaceEditorInterface
- class \Drupal\Core\Plugin\PluginBase extends \Drupal\Component\Plugin\PluginBase uses \Drupal\Core\StringTranslation\StringTranslationTrait, \Drupal\Core\DependencyInjection\DependencySerializationTrait, \Drupal\Core\Messenger\MessengerTrait
Expanded class hierarchy of Image
266 string references to 'Image'
- aggregator_entity_extra_field_info in core/
modules/ aggregator/ aggregator.module - Implements hook_entity_extra_field_info().
- AjaxFileManagedMultipleTest::testMultipleFilesUpload in core/
modules/ file/ tests/ src/ FunctionalJavascript/ AjaxFileManagedMultipleTest.php - Test if managed file form element works well with multiple files upload.
- CKEditorIntegrationTest::setUp in core/
modules/ media_library/ tests/ src/ FunctionalJavascript/ CKEditorIntegrationTest.php - CKEditorIntegrationTest::setUp in core/
modules/ media_library/ tests/ src/ FunctionalJavascript/ CKEditorIntegrationTest.php - CKEditorIntegrationTest::setUp in core/
modules/ media/ tests/ src/ FunctionalJavascript/ CKEditorIntegrationTest.php
File
-
core/
modules/ image/ src/ Plugin/ InPlaceEditor/ Image.php, line 15
Namespace
Drupal\image\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' => [
'image/quickedit.inPlaceEditor.image',
],
];
}
}
Members
Title Sort descending | Modifiers | Object type | Summary | Overriden Title | Overrides |
---|---|---|---|---|---|
Image::getAttachments | public | function | Returns the attachments for this editor. | Overrides InPlaceEditorInterface::getAttachments | |
Image::isCompatible | public | function | Checks whether this in-place editor is compatible with a given field. | Overrides InPlaceEditorInterface::isCompatible | |
InPlaceEditorBase::getMetadata | public | function | Generates metadata that is needed specifically for this editor. | Overrides InPlaceEditorInterface::getMetadata | 1 |
PluginInspectionInterface::getPluginDefinition | public | function | Gets the definition of the plugin implementation. | 6 | |
PluginInspectionInterface::getPluginId | public | function | Gets the plugin_id of the plugin instance. | 2 |
Buggy or inaccurate documentation? Please file an issue. Need support? Need help programming? Connect with the Drupal community.