interface LogLocationInterface in farmOS 2.x
The interface for log location logic.
Hierarchy
- interface \Drupal\farm_location\LogLocationInterface
Expanded class hierarchy of LogLocationInterface
All classes that implement LogLocationInterface
File
- modules/
core/ location/ src/ LogLocationInterface.php, line 10
Namespace
Drupal\farm_locationView source
interface LogLocationInterface {
/**
* Check if a log references location assets.
*
* @param \Drupal\log\Entity\LogInterface $log
* The Log entity.
*
* @return bool
* Returns TRUE if the log references location assets, FALSE otherwise.
*/
public function hasLocation(LogInterface $log) : bool;
/**
* Check if a log has geometry.
*
* @param \Drupal\log\Entity\LogInterface $log
* The Log entity.
*
* @return bool
* Returns TRUE if the log has geometry, FALSE otherwise.
*/
public function hasGeometry(LogInterface $log) : bool;
/**
* Get location assets referenced by a log.
*
* @param \Drupal\log\Entity\LogInterface $log
* The Log entity.
*
* @return array
* Returns an array of assets.
*/
public function getLocation(LogInterface $log) : array;
/**
* Get a log's geometry.
*
* @param \Drupal\log\Entity\LogInterface $log
* The Log entity.
*
* @return string
* Returns a WKT string.
*/
public function getGeometry(LogInterface $log) : string;
/**
* Set a log's location.
*
* @param \Drupal\log\Entity\LogInterface $log
* The Log entity.
* @param \Drupal\asset\Entity\AssetInterface[] $assets
* An array of location asset entities.
*/
public function setLocation(LogInterface $log, array $assets) : void;
/**
* Set a log's geometry.
*
* @param \Drupal\log\Entity\LogInterface $log
* The Log entity.
* @param string $wkt
* The geometry as a WKT string.
*/
public function setGeometry(LogInterface $log, string $wkt) : void;
}
Members
Name | Modifiers | Type | Description | Overrides |
---|---|---|---|---|
LogLocationInterface:: |
public | function | Get a log's geometry. | 1 |
LogLocationInterface:: |
public | function | Get location assets referenced by a log. | 1 |
LogLocationInterface:: |
public | function | Check if a log has geometry. | 1 |
LogLocationInterface:: |
public | function | Check if a log references location assets. | 1 |
LogLocationInterface:: |
public | function | Set a log's geometry. | 1 |
LogLocationInterface:: |
public | function | Set a log's location. | 1 |