public function EntityParser::getRemoteChangedTime in Entity Share 8.3
Gets 'changed' timestamp of remote entity, if available.
Parameters
array $remote_data: JSON:API data of a single entity.
Overrides EntityParserInterface::getRemoteChangedTime
File
- modules/
entity_share_diff/ src/ Service/ EntityParser.php, line 200
Class
- EntityParser
- Entity parser.
Namespace
Drupal\entity_share_diff\ServiceCode
public function getRemoteChangedTime(array $remote_data) {
$changed_public_name = $this
->getPublicFieldName('changed', $remote_data);
$entity_changed_time = 0;
if ($changed_public_name && !empty($remote_data['attributes'][$changed_public_name])) {
$entity_changed_time = EntityShareUtility::convertChangedTime($remote_data['attributes'][$changed_public_name]);
}
return $entity_changed_time;
}