You are here

public static function AutoAspectEffect::create in Thunder 6.2.x

Same name and namespace in other branches
  1. 8.5 modules/thunder_media/src/Plugin/ImageEffect/AutoAspectEffect.php \Drupal\thunder_media\Plugin\ImageEffect\AutoAspectEffect::create()
  2. 6.0.x modules/thunder_media/src/Plugin/ImageEffect/AutoAspectEffect.php \Drupal\thunder_media\Plugin\ImageEffect\AutoAspectEffect::create()
  3. 6.1.x modules/thunder_media/src/Plugin/ImageEffect/AutoAspectEffect.php \Drupal\thunder_media\Plugin\ImageEffect\AutoAspectEffect::create()

Creates an instance of the plugin.

Parameters

\Symfony\Component\DependencyInjection\ContainerInterface $container: The container to pull out services used in the plugin.

array $configuration: A configuration array containing information about the plugin instance.

string $plugin_id: The plugin ID for the plugin instance.

mixed $plugin_definition: The plugin implementation definition.

Return value

static Returns an instance of this plugin.

Overrides ImageEffectBase::create

File

modules/thunder_media/src/Plugin/ImageEffect/AutoAspectEffect.php, line 32

Class

AutoAspectEffect
Resizes an image resource.

Namespace

Drupal\thunder_media\Plugin\ImageEffect

Code

public static function create(ContainerInterface $container, array $configuration, $plugin_id, $plugin_definition) {
  $style = parent::create($container, $configuration, $plugin_id, $plugin_definition);
  $style
    ->setEntityTypeManager($container
    ->get('entity_type.manager'));
  return $style;
}