You are here

public function TwitterWidget::setPublished in Twitter Profile Widget 8

Sets the published status of a Twitter widget.

Parameters

bool $published: TRUE to set this Twitter widget to published, FALSE to set it to unpublished.

Return value

\Drupal\twitter_profile_widget\TwitterWidgetInterface The called Twitter widget entity.

Overrides TwitterWidgetInterface::setPublished

File

src/Entity/TwitterWidget.php, line 141

Class

TwitterWidget
Defines the Twitter widget entity.

Namespace

Drupal\twitter_profile_widget\Entity

Code

public function setPublished($published) {
  $this
    ->set('status', $published ? NODE_PUBLISHED : NODE_NOT_PUBLISHED);
  return $this;
}