public function LogLocation::hasLocation in farmOS 2.x
Check if a log references location assets.
Parameters
\Drupal\log\Entity\LogInterface $log: The Log entity.
Return value
bool Returns TRUE if the log references location assets, FALSE otherwise.
Overrides LogLocationInterface::hasLocation
File
- modules/
core/ location/ src/ LogLocation.php, line 29
Class
- LogLocation
- Log location logic.
Namespace
Drupal\farm_locationCode
public function hasLocation(LogInterface $log) : bool {
return !$log
->get(static::LOG_FIELD_LOCATION)
->isEmpty();
}