interface SubscriptionWidgetInterface in Simplenews 8
Same name and namespace in other branches
- 8.2 src/SubscriptionWidgetInterface.php \Drupal\simplenews\SubscriptionWidgetInterface
- 3.x src/SubscriptionWidgetInterface.php \Drupal\simplenews\SubscriptionWidgetInterface
Defines a widget used for the subscriptions field of a Subscriber.
Hierarchy
- interface \Drupal\Component\Plugin\PluginInspectionInterface; interface \Drupal\Core\Config\Entity\ThirdPartySettingsInterface- interface \Drupal\Core\Field\PluginSettingsInterface- interface \Drupal\Core\Field\WidgetBaseInterface- interface \Drupal\Core\Field\WidgetInterface- interface \Drupal\simplenews\SubscriptionWidgetInterface
 
 
- interface \Drupal\Core\Field\WidgetInterface
 
- interface \Drupal\Core\Field\WidgetBaseInterface
 
- interface \Drupal\Core\Field\PluginSettingsInterface
Expanded class hierarchy of SubscriptionWidgetInterface
All classes that implement SubscriptionWidgetInterface
1 file declares its use of SubscriptionWidgetInterface
- SubscriptionWidget.php in src/Plugin/ Field/ FieldWidget/ SubscriptionWidget.php 
File
- src/SubscriptionWidgetInterface.php, line 10 
Namespace
Drupal\simplenewsView source
interface SubscriptionWidgetInterface extends WidgetInterface {
  /**
   * Set the newsletters available for selection.
   *
   * @param string[] $newsletter_ids
   *   Indexed array of newsletter IDs.
   */
  public function setAvailableNewsletterIds(array $newsletter_ids);
  /**
   * Hide the widget.
   *
   * Must be called before ::formElement().
   *
   * @param bool $set
   *   If FALSE, widget will not be hidden.
   */
  public function setHidden($set = TRUE);
  /**
   * Whether the widget is set to be hidden.
   *
   * @return bool
   *   Whether the widget is hidden.
   */
  public function isHidden();
  /**
   * Returns the IDs of the selected or deselected newsletters.
   *
   * @param array $form_state_value
   *   The value of the widget as returned by FormStateInterface::getValue().
   * @param bool $selected
   *   Whether to extract selected (TRUE) or deselected (FALSE) newsletter IDs.
   *
   * @return string[]
   *   IDs of selected/deselected newsletters.
   */
  public function extractNewsletterIds($form_state_value, $selected);
}Members
| Name   | Modifiers | Type | Description | Overrides | 
|---|---|---|---|---|
| PluginInspectionInterface:: | public | function | Gets the definition of the plugin implementation. | 4 | 
| PluginInspectionInterface:: | public | function | Gets the plugin_id of the plugin instance. | 2 | 
| PluginSettingsInterface:: | public static | function | Defines the default settings for this plugin. | 1 | 
| PluginSettingsInterface:: | public | function | Returns the value of a setting, or its default value if absent. | 1 | 
| PluginSettingsInterface:: | public | function | Returns the array of settings, including defaults for missing settings. | 1 | 
| PluginSettingsInterface:: | public | function | Informs the plugin that some configuration it depends on will be deleted. | 1 | 
| PluginSettingsInterface:: | public | function | Sets the value of a setting for the plugin. | 1 | 
| PluginSettingsInterface:: | public | function | Sets the settings for the plugin. | 1 | 
| SubscriptionWidgetInterface:: | public | function | Returns the IDs of the selected or deselected newsletters. | 1 | 
| SubscriptionWidgetInterface:: | public | function | Whether the widget is set to be hidden. | 1 | 
| SubscriptionWidgetInterface:: | public | function | Set the newsletters available for selection. | 1 | 
| SubscriptionWidgetInterface:: | public | function | Hide the widget. | 1 | 
| ThirdPartySettingsInterface:: | public | function | Gets the list of third parties that store information. | 5 | 
| ThirdPartySettingsInterface:: | public | function | Gets the value of a third-party setting. | 5 | 
| ThirdPartySettingsInterface:: | public | function | Gets all third-party settings of a given module. | 5 | 
| ThirdPartySettingsInterface:: | public | function | Sets the value of a third-party setting. | 5 | 
| ThirdPartySettingsInterface:: | public | function | Unsets a third-party setting. | 5 | 
| WidgetBaseInterface:: | public | function | Extracts field values from submitted form values. | 1 | 
| WidgetBaseInterface:: | public | function | Reports field-level validation errors against actual form elements. | 1 | 
| WidgetBaseInterface:: | public | function | Creates a form element for a field. | 1 | 
| WidgetBaseInterface:: | public static | function | Retrieves processing information about the widget from $form_state. | 1 | 
| WidgetBaseInterface:: | public static | function | Stores processing information about the widget in $form_state. | 1 | 
| WidgetInterface:: | public | function | Assigns a field-level validation error to the right widget sub-element. | 1 | 
| WidgetInterface:: | public | function | Returns the form for a single field widget. | 22 | 
| WidgetInterface:: | public static | function | Returns if the widget can be used for the provided field. | 1 | 
| WidgetInterface:: | public | function | Massages the form values into the format expected for field values. | 1 | 
| WidgetInterface:: | public | function | Returns a form to configure settings for the widget. | 1 | 
| WidgetInterface:: | public | function | Returns a short summary for the current widget settings. | 1 | 
