You are here

public function Feed::setActive in Feeds 8.3

Sets the active status of a feed.

Parameters

bool $active: True to set this feed to active, false to set it to inactive.

Overrides FeedInterface::setActive

File

src/Entity/Feed.php, line 247

Class

Feed
Defines the feed entity class.

Namespace

Drupal\feeds\Entity

Code

public function setActive($active) {
  $this
    ->set('status', $active ? static::ACTIVE : static::INACTIVE);
}