GeofieldWKT.php in Geofield 8
File
src/Plugin/migrate/process/GeofieldWKT.php
View source
<?php
namespace Drupal\geofield\Plugin\migrate\process;
use Drupal\Core\Plugin\ContainerFactoryPluginInterface;
use Drupal\migrate\MigrateExecutableInterface;
use Drupal\migrate\ProcessPluginBase;
use Drupal\migrate\Row;
use Drupal\geofield\WktGeneratorInterface;
use Symfony\Component\DependencyInjection\ContainerInterface;
class GeofieldWKT extends ProcessPluginBase implements ContainerFactoryPluginInterface {
protected $wktGenerator;
public function __construct(array $configuration, $plugin_id, $plugin_definition, WktGeneratorInterface $wkt_generator) {
parent::__construct($configuration, $plugin_id, $plugin_definition);
$this->wktGenerator = $wkt_generator;
}
public static function create(ContainerInterface $container, array $configuration, $plugin_id, $plugin_definition) {
return new static($configuration, $plugin_id, $plugin_definition, $container
->get('geofield.wkt_generator'));
}
public function transform($value, MigrateExecutableInterface $migrate_executable, Row $row, $destination_property) {
return $value;
}
}
Classes
Name |
Description |
GeofieldWKT |
Process WKT string and return the value for the D8 geofield. |