You are here

public function SocialPostAlbumImageWidget::__construct in Open Social 10.2.x

Same name and namespace in other branches
  1. 10.3.x modules/social_features/social_post/modules/social_post_album/src/Plugin/Field/FieldWidget/SocialPostAlbumImageWidget.php \Drupal\social_post_album\Plugin\Field\FieldWidget\SocialPostAlbumImageWidget::__construct()
  2. 10.0.x modules/social_features/social_post/modules/social_post_album/src/Plugin/Field/FieldWidget/SocialPostAlbumImageWidget.php \Drupal\social_post_album\Plugin\Field\FieldWidget\SocialPostAlbumImageWidget::__construct()
  3. 10.1.x modules/social_features/social_post/modules/social_post_album/src/Plugin/Field/FieldWidget/SocialPostAlbumImageWidget.php \Drupal\social_post_album\Plugin\Field\FieldWidget\SocialPostAlbumImageWidget::__construct()

Constructs an SocialPostAlbumImageWidget object.

Parameters

string $plugin_id: The plugin_id for the widget.

mixed $plugin_definition: The plugin implementation definition.

\Drupal\Core\Field\FieldDefinitionInterface $field_definition: The definition of the field to which the widget is associated.

array $settings: The widget settings.

array $third_party_settings: Any third party settings.

\Drupal\Core\Render\ElementInfoManagerInterface $element_info: The element info manager service.

\Drupal\Core\Image\ImageFactory $image_factory: (optional) The image factory service.

\Drupal\Core\Routing\RouteMatchInterface $route_match: (optional) The currently active route match object.

Overrides ImageWidget::__construct

File

modules/social_features/social_post/modules/social_post_album/src/Plugin/Field/FieldWidget/SocialPostAlbumImageWidget.php, line 54

Class

SocialPostAlbumImageWidget
Plugin implementation of the 'social_post_album_image' widget.

Namespace

Drupal\social_post_album\Plugin\Field\FieldWidget

Code

public function __construct($plugin_id, $plugin_definition, FieldDefinitionInterface $field_definition, array $settings, array $third_party_settings, ElementInfoManagerInterface $element_info, ImageFactory $image_factory = NULL, RouteMatchInterface $route_match = NULL) {
  parent::__construct($plugin_id, $plugin_definition, $field_definition, $settings, $third_party_settings, $element_info, $image_factory);
  $this->routeMatch = $route_match ?: \Drupal::routeMatch();
}