class Image

Same name in this branch
  1. 8.9.x core/modules/media/src/Plugin/media/Source/Image.php \Drupal\media\Plugin\media\Source\Image
  2. 8.9.x core/lib/Drupal/Core/Image/Image.php \Drupal\Core\Image\Image
  3. 8.9.x core/lib/Drupal/Component/Utility/Image.php \Drupal\Component\Utility\Image
Same name in other branches
  1. 9 core/modules/media/src/Plugin/media/Source/Image.php \Drupal\media\Plugin\media\Source\Image
  2. 9 core/modules/ckeditor5/src/Plugin/CKEditor5Plugin/Image.php \Drupal\ckeditor5\Plugin\CKEditor5Plugin\Image
  3. 9 core/modules/quickedit/src/Plugin/InPlaceEditor/Image.php \Drupal\quickedit\Plugin\InPlaceEditor\Image
  4. 9 core/modules/image/src/Plugin/InPlaceEditor/Image.php \Drupal\image\Plugin\InPlaceEditor\Image
  5. 9 core/lib/Drupal/Core/Image/Image.php \Drupal\Core\Image\Image
  6. 9 core/lib/Drupal/Component/Utility/Image.php \Drupal\Component\Utility\Image
  7. 10 core/modules/media/src/Plugin/media/Source/Image.php \Drupal\media\Plugin\media\Source\Image
  8. 10 core/modules/ckeditor5/src/Plugin/CKEditor5Plugin/Image.php \Drupal\ckeditor5\Plugin\CKEditor5Plugin\Image
  9. 10 core/lib/Drupal/Core/Image/Image.php \Drupal\Core\Image\Image
  10. 10 core/lib/Drupal/Component/Utility/Image.php \Drupal\Component\Utility\Image
  11. 11.x core/modules/media/src/Plugin/media/Source/Image.php \Drupal\media\Plugin\media\Source\Image
  12. 11.x core/modules/ckeditor5/src/Plugin/CKEditor5Plugin/Image.php \Drupal\ckeditor5\Plugin\CKEditor5Plugin\Image
  13. 11.x core/lib/Drupal/Core/Image/Image.php \Drupal\Core\Image\Image
  14. 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

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

... See full list

File

core/modules/image/src/Plugin/InPlaceEditor/Image.php, line 15

Namespace

Drupal\image\Plugin\InPlaceEditor
View 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.