You are here

protected function AmpPrepareMetadataJson::prepareDateModified in Accelerated Mobile Pages (AMP) 8

Prepare the modified date.

1 call to AmpPrepareMetadataJson::prepareDateModified()
AmpPrepareMetadataJson::prepareMetadataJson in src/Utility/AmpPrepareMetadataJson.php
Prepares a metadata array to be ready for JSON conversion.

File

src/Utility/AmpPrepareMetadataJson.php, line 204

Class

AmpPrepareMetadataJson
Class AmpPrepareMetadataJson

Namespace

Drupal\amp\Utility

Code

protected function prepareDateModified() {
  $date_modified = date(DATE_ATOM, $this->node
    ->getChangedTime());
  if (!empty($date_modified)) {
    $this->ampPreparedMetadataJson['dateModified'] = $date_modified;
  }
}