public function SmsGateway::setRetentionDuration in SMS Framework 8
Same name and namespace in other branches
- 2.x src/Entity/SmsGateway.php \Drupal\sms\Entity\SmsGateway::setRetentionDuration()
- 2.1.x src/Entity/SmsGateway.php \Drupal\sms\Entity\SmsGateway::setRetentionDuration()
Set how many seconds to hold messages..
Parameters
int $direction: The direction of the message. See SmsMessageInterface::DIRECTION_* constants.
int $retention_duration: How many seconds to hold messages, or use -1 to never expire.
Return value
$this Return this gateway for chaining.
Overrides SmsGatewayInterface::setRetentionDuration
File
- src/
Entity/ SmsGateway.php, line 262
Class
- SmsGateway
- Defines storage for an SMS Gateway instance.
Namespace
Drupal\sms\EntityCode
public function setRetentionDuration($direction, $retention_duration) {
switch ($direction) {
case Direction::INCOMING:
$this->retention_duration_incoming = $retention_duration;
break;
case Direction::OUTGOING:
$this->retention_duration_outgoing = $retention_duration;
break;
}
return $this;
}