You are here

class Image in Drupal 10

Same name in this branch
  1. 10 core/lib/Drupal/Core/Image/Image.php \Drupal\Core\Image\Image
  2. 10 core/lib/Drupal/Component/Utility/Image.php \Drupal\Component\Utility\Image
  3. 10 core/modules/quickedit/src/Plugin/InPlaceEditor/Image.php \Drupal\quickedit\Plugin\InPlaceEditor\Image
  4. 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

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

... See full list

File

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

Namespace

Drupal\quickedit\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' => [
        'quickedit/quickedit.inPlaceEditor.image',
      ],
    ];
  }

}

Members