You are here

public function SubscriptionWidget::setHidden in Simplenews 8

Same name and namespace in other branches
  1. 8.2 src/Plugin/Field/FieldWidget/SubscriptionWidget.php \Drupal\simplenews\Plugin\Field\FieldWidget\SubscriptionWidget::setHidden()
  2. 3.x src/Plugin/Field/FieldWidget/SubscriptionWidget.php \Drupal\simplenews\Plugin\Field\FieldWidget\SubscriptionWidget::setHidden()

Hide the widget.

Must be called before ::formElement().

Parameters

bool $set: If FALSE, widget will not be hidden.

Overrides SubscriptionWidgetInterface::setHidden

File

src/Plugin/Field/FieldWidget/SubscriptionWidget.php, line 48

Class

SubscriptionWidget
Plugin implementation of the 'simplenews_subscription_select' widget.

Namespace

Drupal\simplenews\Plugin\Field\FieldWidget

Code

public function setHidden($set = TRUE) {
  $this->hidden = (bool) $set;
}