public function Subscription::setLease in Feeds 8.3
Sets the number of seconds of the lease.
Usually this value is retrieved from the hub where is being subscribed to and then stored on the subscription entity.
Parameters
int $lease: The time, in seconds of the lease.
Overrides SubscriptionInterface::setLease
File
- src/
Entity/ Subscription.php, line 101
Class
- Subscription
- Defines the subscription entity class.
Namespace
Drupal\feeds\EntityCode
public function setLease($lease) {
$lease = (int) trim($lease);
$this
->set('lease', $lease);
$this
->set('expires', $lease + \Drupal::time()
->getRequestTime());
}