/** * Constructs a WidgetBase object. * * @param array $plugin_id * The plugin_id for the widget. * @param mixed $plugin_definition * The plugin implementation definition. * @param \Drupal\Core\Field\FieldDefinitionInterface $field_definition * The definition of the field to which the widget is associated. * @param array $settings * The widget settings. * @param array $third_party_settings * Any third party settings. */ public function __construct($plugin_id, $plugin_definition, FieldDefinitionInterface $field_definition, array $settings, array $third_party_settings) { parent::__construct(array(), $plugin_id, $plugin_definition); $this->fieldDefinition = $field_definition; $this->settings = $settings; $this->thirdPartySettings = $third_party_settings; }
/** * Constructs a FieldGroupFormatterBase object. * * @param string $plugin_id * The plugin_id for the formatter. * @param mixed $plugin_definition * The plugin implementation definition. * @param $group * The group object. * @param array $settings * The formatter settings. * @param string $label * The formatter label. */ public function __construct($plugin_id, $plugin_definition, $group, array $settings, $label) { parent::__construct(array(), $plugin_id, $plugin_definition); $this->group = $group; $this->settings = $settings; $this->label = $label; $this->context = $group->context; }
/** * Constructs a FormatterBase object. * * @param string $plugin_id * The plugin_id for the formatter. * @param mixed $plugin_definition * The plugin implementation definition. * @param \Drupal\Core\Field\FieldDefinitionInterface $field_definition * The definition of the field to which the formatter is associated. * @param array $settings * The formatter settings. * @param string $label * The formatter label display setting. * @param string $view_mode * The view mode. * @param array $third_party_settings * Any third party settings. */ public function __construct($plugin_id, $plugin_definition, FieldDefinitionInterface $field_definition, array $settings, $label, $view_mode, array $third_party_settings) { parent::__construct(array(), $plugin_id, $plugin_definition); $this->fieldDefinition = $field_definition; $this->settings = $settings; $this->label = $label; $this->viewMode = $view_mode; $this->thirdPartySettings = $third_party_settings; }