class Image
Same name in this branch
- 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/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
Same name in other branches
- 8.9.x core/modules/media/src/Plugin/media/Source/Image.php \Drupal\media\Plugin\media\Source\Image
- 8.9.x core/modules/image/src/Plugin/InPlaceEditor/Image.php \Drupal\image\Plugin\InPlaceEditor\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
- 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\quickedit\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
298 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 - Tests if managed file form element works well with multiple files upload.
- ckeditor5.ckeditor5.yml in core/
modules/ ckeditor5/ ckeditor5.ckeditor5.yml - core/modules/ckeditor5/ckeditor5.ckeditor5.yml
- CKEditor5AllowedTagsTest::testImgAddedViaUploadPlugin in core/
modules/ ckeditor5/ tests/ src/ FunctionalJavascript/ CKEditor5AllowedTagsTest.php - Tests that the img tag is added after enabling image uploads.
- CKEditor5Test::testActiveTabsMaintained in core/
modules/ ckeditor5/ tests/ src/ FunctionalJavascript/ CKEditor5Test.php - Confirms active tab status is intact after AJAX refresh.
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',
],
];
}
}
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.