public function ItemStorageController::create

Overrides Drupal\Core\Entity\DataBaseStorageController::create().

Overrides DatabaseStorageControllerNG::create

File

drupal/core/modules/aggregator/lib/Drupal/aggregator/ItemStorageController.php, line 24
Contains \Drupal\aggregator\ItemStorageController.

Class

ItemStorageController
Controller class for aggregators items.

Namespace

Drupal\aggregator

Code

public function create(array $values) {
  $entity = parent::create($values);

  // Set an initial timestamp, this will be overwritten if known.
  $entity->timestamp->value = REQUEST_TIME;
  return $entity;
}