This repository has been archived by the owner on Aug 25, 2022. It is now read-only.
-
Notifications
You must be signed in to change notification settings - Fork 9
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Merge pull request #70 from ec-europa/limit_graphs
Allow limiting the default of graphs when no candidate graphs are passed
- Loading branch information
Showing
16 changed files
with
401 additions
and
137 deletions.
There are no files selected for viewing
7 changes: 0 additions & 7 deletions
7
modules/rdf_draft/tests/modules/rdf_draft_test/rdf_draft_test.info.yml
This file was deleted.
Oops, something went wrong.
114 changes: 0 additions & 114 deletions
114
modules/rdf_draft/tests/src/Kernel/RdfDraftGraphTest.php
This file was deleted.
Oops, something went wrong.
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,62 @@ | ||
<?php | ||
|
||
namespace Drupal\rdf_entity\Event; | ||
|
||
use Symfony\Component\EventDispatcher\Event; | ||
|
||
/** | ||
* An event dispatched when the default graph IDs list is built. | ||
*/ | ||
class DefaultGraphsEvent extends Event { | ||
|
||
/** | ||
* The entity type ID. | ||
* | ||
* @var string | ||
*/ | ||
protected $entityTypeId; | ||
|
||
/** | ||
* The list of default graph IDs. | ||
* | ||
* @var array | ||
*/ | ||
protected $defaultGraphIds = []; | ||
|
||
/** | ||
* Instantiates a new event object. | ||
* | ||
* @param string $entity_type_id | ||
* The entity type ID. | ||
* @param array $default_graph_ids | ||
* A list of graph IDs. | ||
*/ | ||
public function __construct(string $entity_type_id, array $default_graph_ids) { | ||
$this->entityTypeId = $entity_type_id; | ||
$this->defaultGraphIds = $default_graph_ids; | ||
} | ||
|
||
/** | ||
* Sets the list of default graph IDs. | ||
* | ||
* @param array $default_graph_ids | ||
* A list of graph IDs. | ||
* | ||
* @return $this | ||
*/ | ||
public function setDefaultGraphIds(array $default_graph_ids): self { | ||
$this->defaultGraphIds = $default_graph_ids; | ||
return $this; | ||
} | ||
|
||
/** | ||
* Returns the list of default graph IDs. | ||
* | ||
* @return string[] | ||
* A list of default graph IDs. | ||
*/ | ||
public function getDefaultGraphIds(): array { | ||
return $this->defaultGraphIds; | ||
} | ||
|
||
} |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Oops, something went wrong.