Drupal 8  8.0.2
ScaleAndCropImageEffect Class Reference
Inheritance diagram for ScaleAndCropImageEffect:

Public Member Functions

 applyEffect (ImageInterface $image)
 
- Public Member Functions inherited from ResizeImageEffect
 applyEffect (ImageInterface $image)
 
 transformDimensions (array &$dimensions, $uri)
 
 getSummary ()
 
 defaultConfiguration ()
 
 buildConfigurationForm (array $form, FormStateInterface $form_state)
 
 submitConfigurationForm (array &$form, FormStateInterface $form_state)
 
- Public Member Functions inherited from ConfigurableImageEffectBase
 validateConfigurationForm (array &$form, FormStateInterface $form_state)
 
 submitConfigurationForm (array &$form, FormStateInterface $form_state)
 
- Public Member Functions inherited from ImageEffectBase
 __construct (array $configuration, $plugin_id, $plugin_definition, LoggerInterface $logger)
 
 transformDimensions (array &$dimensions, $uri)
 
 getDerivativeExtension ($extension)
 
 getSummary ()
 
 label ()
 
 getUuid ()
 
 setWeight ($weight)
 
 getWeight ()
 
 getConfiguration ()
 
 setConfiguration (array $configuration)
 
 defaultConfiguration ()
 
 calculateDependencies ()
 
- Public Member Functions inherited from PluginInspectionInterface
 getPluginId ()
 
 getPluginDefinition ()
 

Additional Inherited Members

- Static Public Member Functions inherited from ImageEffectBase
static create (ContainerInterface $container, array $configuration, $plugin_id, $plugin_definition)
 
- Protected Attributes inherited from ImageEffectBase
 $uuid
 
 $weight = ''
 
 $logger
 

Detailed Description

Scales and crops an image resource.

( id = "image_scale_and_crop", label = ("Scale and crop"), description = ("Scale and crop will maintain the aspect-ratio of the original image, then crop the larger dimension. This is most useful for creating perfectly square thumbnails without stretching the image.") )

Member Function Documentation

applyEffect ( ImageInterface  $image)

{Applies an image effect to the image object.

Parameters
\Drupal\Core\Image\ImageInterface$imageAn image file object.
Returns
bool TRUE on success. FALSE if unable to perform the image effect on the image.
}

Implements ImageEffectInterface.

References ImageInterface\getHeight(), ImageInterface\getMimeType(), ImageInterface\getSource(), ImageInterface\getToolkitId(), ImageInterface\getWidth(), Drupal\logger(), and ImageInterface\scaleAndCrop().

Here is the call graph for this function:


The documentation for this class was generated from the following file: