You are here

public function Feed::setState in Feeds 8.3

Sets a state object for a given stage.

Parameters

string $stage: One of StateInterface::FETCH, StateInterface::PARSE, StateInterface::PROCESS or StateInterface::CLEAR.

\Drupal\feeds\StateInterface|null $state: A state object or null to unset the state for the given stage.

Overrides FeedInterface::setState

File

src/Entity/Feed.php, line 391

Class

Feed
Defines the feed entity class.

Namespace

Drupal\feeds\Entity

Code

public function setState($stage, StateInterface $state = NULL) {
  $this->states[$stage] = $state;
}