You are here

public function LatestActivity::getTimestamp in Opigno Learning path 8

Same name and namespace in other branches
  1. 3.x src/Entity/LatestActivity.php \Drupal\opigno_learning_path\Entity\LatestActivity::getTimestamp()

Gets the timestamp.

Return value

int The timestamp.

Overrides LatestActivityInterface::getTimestamp

File

src/Entity/LatestActivity.php, line 139

Class

LatestActivity
Defines the Latest Activity entity.

Namespace

Drupal\opigno_learning_path\Entity

Code

public function getTimestamp() {
  $value = $this
    ->get('timestamp')
    ->getValue();
  if (!isset($value)) {
    return NULL;
  }
  return $value[0]['value'];
}