function FormattedDateDiff::getMaxAge
The maximum age for which this object may be cached.
Return value
int The maximum time in seconds that this object may be cached.
Deprecated
in drupal:8.1.9 and is removed from drupal:9.0.0. Use \Drupal\Core\Datetime\FormattedDateDiff::getCacheMaxAge() instead.
See also
https://www.drupal.org/node/2783545
File
-
core/
lib/ Drupal/ Core/ Datetime/ FormattedDateDiff.php, line 71
Class
- FormattedDateDiff
- Contains a formatted time difference.
Namespace
Drupal\Core\DatetimeCode
public function getMaxAge() {
@trigger_error(__NAMESPACE__ . '\\FormattedDateDiff::getMaxAge() is deprecated in drupal:8.1.9 and is removed from drupal:9.0.0. Use \\Drupal\\Core\\Datetime\\FormattedDateDiff::getCacheMaxAge() instead. See https://www.drupal.org/node/2783545', E_USER_DEPRECATED);
return $this->getCacheMaxAge();
}
Buggy or inaccurate documentation? Please file an issue. Need support? Need help programming? Connect with the Drupal community.