function ImageUrlFormatter::create

Same name in other branches
  1. 10 core/modules/image/src/Plugin/Field/FieldFormatter/ImageUrlFormatter.php \Drupal\image\Plugin\Field\FieldFormatter\ImageUrlFormatter::create()
  2. 11.x core/modules/image/src/Plugin/Field/FieldFormatter/ImageUrlFormatter.php \Drupal\image\Plugin\Field\FieldFormatter\ImageUrlFormatter::create()

Overrides FormatterBase::create

File

core/modules/image/src/Plugin/Field/FieldFormatter/ImageUrlFormatter.php, line 73

Class

ImageUrlFormatter
Plugin implementation of the 'image_url' formatter.

Namespace

Drupal\image\Plugin\Field\FieldFormatter

Code

public static function create(ContainerInterface $container, array $configuration, $plugin_id, $plugin_definition) {
    return new static($plugin_id, $plugin_definition, $configuration['field_definition'], $configuration['settings'], $configuration['label'], $configuration['view_mode'], $configuration['third_party_settings'], $container->get('entity_type.manager')
        ->getStorage('image_style'), $container->get('current_user'));
}

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