You are here

public function Feed::setImage in Drupal 9

Same name and namespace in other branches
  1. 8 core/modules/aggregator/src/Entity/Feed.php \Drupal\aggregator\Entity\Feed::setImage()

Sets the primary image attached to the feed.

Parameters

string $image: An image URL.

Return value

$this The class instance that this method is called on.

Overrides FeedInterface::setImage

File

core/modules/aggregator/src/Entity/Feed.php, line 370

Class

Feed
Defines the aggregator feed entity class.

Namespace

Drupal\aggregator\Entity

Code

public function setImage($image) {
  $this
    ->set('image', $image);
  return $this;
}