Skip to content
This repository has been archived by the owner on Aug 25, 2022. It is now read-only.

Commit

Permalink
Issue #17: Remove the RDF entity ID generator plugin interface & abst…
Browse files Browse the repository at this point in the history
…ract.
  • Loading branch information
claudiu-cristea committed Dec 11, 2018
1 parent 488866b commit 53ec8c3
Show file tree
Hide file tree
Showing 4 changed files with 6 additions and 124 deletions.
2 changes: 1 addition & 1 deletion rdf_entity.module
Original file line number Diff line number Diff line change
Expand Up @@ -252,7 +252,7 @@ function rdf_entity_form_alter(&$form, FormStateInterface $form_state) {
'#default_value' => $mapping ? $mapping->getRdfType() : NULL,
];

/** @var \Drupal\rdf_entity\RdfEntityIdPluginManager $id_plugin_manager */
/** @var \Drupal\sparql_entity_storage\SparqlEntityStorageEntityIdPluginManager $id_plugin_manager */
$id_plugin_manager = \Drupal::service('plugin.manager.sparql_entity_id');
$plugins = array_map(function (array $definition) use ($id_plugin_manager) {
return $definition['name'];
Expand Down
10 changes: 5 additions & 5 deletions src/Entity/RdfEntitySparqlStorage.php
Original file line number Diff line number Diff line change
Expand Up @@ -21,9 +21,9 @@
use Drupal\rdf_entity\Database\Driver\sparql\ConnectionInterface;
use Drupal\rdf_entity\Entity\Query\Sparql\SparqlArg;
use Drupal\rdf_entity\Exception\DuplicatedIdException;
use Drupal\rdf_entity\RdfEntityIdPluginManager;
use Drupal\rdf_entity\RdfEntitySparqlStorageInterface;
use Drupal\rdf_entity\RdfFieldHandlerInterface;
use Drupal\sparql_entity_storage\SparqlEntityStorageEntityIdPluginManager;
use Drupal\sparql_entity_storage\SparqlEntityStorageGraphHandlerInterface;
use EasyRdf\Graph;
use EasyRdf\Literal;
Expand Down Expand Up @@ -93,7 +93,7 @@ class RdfEntitySparqlStorage extends ContentEntityStorageBase implements RdfEnti
/**
* The RDF entity ID generator plugin manager.
*
* @var \Drupal\rdf_entity\RdfEntityIdPluginManager
* @var \Drupal\sparql_entity_storage\SparqlEntityStorageEntityIdPluginManager
*/
protected $entityIdPluginManager;

Expand All @@ -118,12 +118,12 @@ class RdfEntitySparqlStorage extends ContentEntityStorageBase implements RdfEnti
* The rdf graph helper service.
* @param \Drupal\rdf_entity\RdfFieldHandlerInterface $rdf_field_handler
* The rdf mapping helper service.
* @param \Drupal\rdf_entity\RdfEntityIdPluginManager $entity_id_plugin_manager
* The RDF entity ID generator plugin manager.
* @param \Drupal\sparql_entity_storage\SparqlEntityStorageEntityIdPluginManager $entity_id_plugin_manager
* The SPARQL entity ID generator plugin manager.
* @param \Drupal\Core\Cache\MemoryCache\MemoryCacheInterface $memory_cache
* The memory cache backend.
*/
public function __construct(EntityTypeInterface $entity_type, ConnectionInterface $sparql, EntityManagerInterface $entity_manager, EntityTypeManagerInterface $entity_type_manager, CacheBackendInterface $cache, LanguageManagerInterface $language_manager, ModuleHandlerInterface $module_handler, SparqlEntityStorageGraphHandlerInterface $sparql_graph_handler, RdfFieldHandlerInterface $rdf_field_handler, RdfEntityIdPluginManager $entity_id_plugin_manager, MemoryCacheInterface $memory_cache = NULL) {
public function __construct(EntityTypeInterface $entity_type, ConnectionInterface $sparql, EntityManagerInterface $entity_manager, EntityTypeManagerInterface $entity_type_manager, CacheBackendInterface $cache, LanguageManagerInterface $language_manager, ModuleHandlerInterface $module_handler, SparqlEntityStorageGraphHandlerInterface $sparql_graph_handler, RdfFieldHandlerInterface $rdf_field_handler, SparqlEntityStorageEntityIdPluginManager $entity_id_plugin_manager, MemoryCacheInterface $memory_cache = NULL) {
parent::__construct($entity_type, $entity_manager, $cache, $memory_cache);
$this->sparql = $sparql;
$this->languageManager = $language_manager;
Expand Down
80 changes: 0 additions & 80 deletions src/RdfEntityIdPluginBase.php

This file was deleted.

38 changes: 0 additions & 38 deletions src/RdfEntityIdPluginInterface.php

This file was deleted.

0 comments on commit 53ec8c3

Please sign in to comment.