ImageEffect::$label

The human-readable name of the image effect. Type: \Drupal\Core\Annotation\Translation Related topics Annotation for translatable text Describes how to put translatable UI text into annotations. File core/modules/image/src/Annotation/ImageEffect.php, line 42 Class ImageEffect Defines an image effect annotation object. Namespace Drupal\image\Annotation Code public $label;

ImageEffect::$id

The plugin ID. Type: string File core/modules/image/src/Annotation/ImageEffect.php, line 33 Class ImageEffect Defines an image effect annotation object. Namespace Drupal\image\Annotation Code public $id;

ImageEffect::$description

A brief description of the image effect. This will be shown when adding or configuring this image effect. Type: \Drupal\Core\Annotation\Translation (optional) Related topics Annotation for translatable text Describes how to put translatable UI text into annotations. File core/modules/image/src/Annotation/ImageEffect.php, line 53 Class ImageEffect Defines an image effect annotation object. Namespace Drupal\image\Annotation Code public $description = '';

ImageEffect

Defines an image effect annotation object. Plugin Namespace: Plugin\ImageEffect For a working example, see \Drupal\image\Plugin\ImageEffect\ResizeImageEffect Hierarchy class \Drupal\Component\Annotation\Plugin implements AnnotationInterfaceclass \Drupal\image\Annotation\ImageEffect See also hook_image_effect_info_alter() \Drupal\image\ConfigurableImageEffectInterface \Drupal\image\ConfigurableImageEffectBase \Drupal\image\ImageEffectInterface \Drupal\image\ImageEffectBase \Drupal\image\Ima

ImageButton::valueCallback

public static ImageButton::valueCallback(&$element, $input, FormStateInterface $form_state) Determines how user input is mapped to an element's #value property. Parameters array $element: An associative array containing the properties of the element. mixed $input: The incoming input to populate the form element. If this is FALSE, the element's default value should be returned. \Drupal\Core\Form\FormStateInterface $form_state: The current state of the form. Return value mixed The value to

ImageButton::preRenderButton

public static ImageButton::preRenderButton($element) Prepares a #type 'button' render element for input.html.twig. Parameters array $element: An associative array containing the properties of the element. Properties used: #attributes, #button_type, #name, #value. The #button_type property accepts any value, though core themes have CSS that styles the following button_types appropriately: 'primary', 'danger'. Return value array The $element with prepared variables ready for input.html.twig. Ov

ImageButton::getInfo

public ImageButton::getInfo() Returns the element properties for this element. Return value array An array of element properties. See \Drupal\Core\Render\ElementInfoManagerInterface::getInfo() for documentation of the standard properties of all elements, and the return value format. Overrides Submit::getInfo File core/lib/Drupal/Core/Render/Element/ImageButton.php, line 18 Class ImageButton Provides a form element for a submit button with an image. Namespace Drupal\Core\Render\Element

ImageButton

Provides a form element for a submit button with an image. Plugin annotation @FormElement("image_button") Hierarchy class \Drupal\Component\Plugin\PluginBase implements DerivativeInspectionInterface, PluginInspectionInterfaceclass \Drupal\Core\Plugin\PluginBase uses DependencySerializationTrait, StringTranslationTraitclass \Drupal\Core\Render\Element\RenderElement implements ElementInterfaceclass \Drupal\Core\Render\Element\FormElement implements FormElementInterfaceclass \Drupal\Core\Render\E

Image::__construct

public Image::__construct(ImageToolkitInterface $toolkit, $source = NULL) Constructs a new Image object. Parameters \Drupal\Core\ImageToolkit\ImageToolkitInterface $toolkit: The image toolkit. string|null $source: (optional) The path to an image file, or NULL to construct the object with no image source. File core/lib/Drupal/Core/Image/Image.php, line 47 Class Image Defines an image object to represent an image file. Namespace Drupal\Core\Image Code public function __construct(ImageTo

Image::scaleDimensions

public static Image::scaleDimensions(array &$dimensions, $width = NULL, $height = NULL, $upscale = FALSE) Scales image dimensions while maintaining aspect ratio. The resulting dimensions can be smaller for one or both target dimensions. Parameters array $dimensions: Dimensions to be modified - an array with components width and height, in pixels. int $width: (optional) The target width, in pixels. If this value is NULL then the scaling will be based only on the height value. int $height: (