class Image

Same name in this branch
  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/lib/Drupal/Core/Image/Image.php \Drupal\Core\Image\Image
  5. 9 core/lib/Drupal/Component/Utility/Image.php \Drupal\Component\Utility\Image
Same name and namespace in other branches
  1. 11.x core/modules/media/src/Plugin/media/Source/Image.php \Drupal\media\Plugin\media\Source\Image
  2. 11.x core/modules/ckeditor5/src/Plugin/CKEditor5Plugin/Image.php \Drupal\ckeditor5\Plugin\CKEditor5Plugin\Image
  3. 11.x core/lib/Drupal/Core/Image/Image.php \Drupal\Core\Image\Image
  4. 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

Deprecated

in drupal:9.4.0 and is removed from drupal:10.0.0. Use the Drupal\quickedit\Plugin\InPlaceEditor\Image in-place editor instead.

See also

https://www.drupal.org/node/3271848

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.

... See full list

File

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

Namespace

Drupal\image\Plugin\InPlaceEditor
View source
class Image extends InPlaceEditorBase {
  
  /**
   * Constructs a Image object.
   */
  public function __construct(array $configuration, $plugin_id, $plugin_definition) {
    @trigger_error('Drupal\\image\\Plugin\\InPlaceEditor\\Image is deprecated in drupal:9.4.0 and is removed from drupal:10.0.0. Use Drupal\\quickedit\\Plugin\\InPlaceEditor\\Image instead. See https://www.drupal.org/node/3271848', E_USER_DEPRECATED);
    parent::__construct($configuration, $plugin_id, $plugin_definition);
  }
  
  /**
   * {@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',
      ],
    ];
  }

}

Buggy or inaccurate documentation? Please file an issue. Need support? Need help programming? Connect with the Drupal community.