openlayers-8.x-4.x-dev/src/Entity/OpenlayersSource.php
src/Entity/OpenlayersSource.php
<?php
namespace Drupal\openlayers\Entity;
use Drupal\Core\Config\Entity\ConfigEntityBase;
use Drupal\openlayers\OpenlayersSourceInterface;
/**
* Defines the Openlayers Source entity.
*
* @ConfigEntityType(
* id = "openlayers_source",
* label = @Translation("Openlayers Source"),
* handlers = {
* "list_builder" = "Drupal\openlayers\Controller\OpenlayersSourceListBuilder",
* "form" = {
* "add" = "Drupal\openlayers\Form\OpenlayersSourceAddForm",
* "edit" = "Drupal\openlayers\Form\OpenlayersSourceEditForm",
* "delete" = "Drupal\openlayers\Form\OpenlayersSourceDeleteForm",
* }
* },
* config_prefix = "source",
* admin_permission = "administer openlayers",
* entity_keys = {
* "id" = "id",
* "label" = "label",
* },
* config_export = {
* "id",
* "label",
* "is_configurable",
* "pluginId",
* "service",
* "options"
* },
* links = {
* "edit-form" = "/admin/config/system/openlayers/source/{openlayers_source}/edit",
* "delete-form" = "/admin/config/system/openlayers/source/{openlayers_source}/delete",
* }
* )
*/
class OpenlayersSource extends ConfigEntityBase implements OpenlayersSourceInterface {
/**
* The Example ID.
*
* @var string
*/
public $id;
/**
* The Example label.
*
* @var string
*/
public $label;
/**
* The factory service.
*
* @var string
*/
public $service;
// Your specific configuration property get/set methods go here,
// implementing the interface.
/**
* {@inheritdoc}
*/
public function id() {
return $this->get('id');
}
/**
* {@inheritdoc}
*/
public function label() {
return $this->label;
}
/**
* {@inheritdoc}
*/
public function service() {
return $this->service;
}
}