You are here

public function Item::setPostedTime in Drupal 9

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

Sets the posted date of the feed item, as a Unix timestamp.

Parameters

int $timestamp: The posted date of the feed item, as a Unix timestamp.

Return value

$this The called feed item entity.

Overrides ItemInterface::setPostedTime

File

core/modules/aggregator/src/Entity/Item.php, line 202

Class

Item
Defines the aggregator item entity class.

Namespace

Drupal\aggregator\Entity

Code

public function setPostedTime($timestamp) {
  return $this
    ->set('timestamp', $timestamp);
}