You are here

GeolocationGeometryMultiLinestring.php in Geolocation Field 8.3

File

modules/geolocation_geometry/src/Plugin/Field/FieldType/GeolocationGeometryMultiLinestring.php
View source
<?php

namespace Drupal\geolocation_geometry\Plugin\Field\FieldType;

use Drupal\Core\Field\FieldStorageDefinitionInterface;

/**
 * Plugin implementation of the 'geolocation' field type.
 *
 * @FieldType(
 *   id = "geolocation_geometry_multilinestring",
 *   label = @Translation("Geolocation Geometry - MultiLine"),
 *   category = @Translation("Spatial fields"),
 *   description = @Translation("This field stores spatial geometry data."),
 *   default_widget = "geolocation_geometry_wkt",
 *   default_formatter = "geolocation_geometry_wkt"
 * )
 */
class GeolocationGeometryMultiLinestring extends GeolocationGeometryBase {

  /**
   * {@inheritdoc}
   */
  public static function schema(FieldStorageDefinitionInterface $field_definition) {
    $schema = parent::schema($field_definition);
    $schema['columns']['geometry']['pgsql_type'] = "geometry('MULTILINESTRING')";
    $schema['columns']['geometry']['mysql_type'] = 'multilinestring';
    return $schema;
  }

}

Classes

Namesort descending Description
GeolocationGeometryMultiLinestring Plugin implementation of the 'geolocation' field type.