You are here

public function LogLocation::getLocation in farmOS 2.x

Get location assets referenced by a log.

Parameters

\Drupal\log\Entity\LogInterface $log: The Log entity.

Return value

array Returns an array of assets.

Overrides LogLocationInterface::getLocation

File

modules/core/location/src/LogLocation.php, line 43

Class

LogLocation
Log location logic.

Namespace

Drupal\farm_location

Code

public function getLocation(LogInterface $log) : array {
  return $log->{static::LOG_FIELD_LOCATION}
    ->referencedEntities() ?? [];
}