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.
Add the rdf_entity_graph config entity.
- Loading branch information
1 parent
05be3d9
commit a946220
Showing
3 changed files
with
74 additions
and
1 deletion.
There are no files selected for viewing
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,5 @@ | ||
langcode: en | ||
status: true | ||
id: default | ||
name: Default | ||
description: 'Default graph. This is available for all entity types and bundles.' |
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,59 @@ | ||
<?php | ||
|
||
namespace Drupal\rdf_entity\Entity; | ||
|
||
use Drupal\Core\Config\Entity\ConfigEntityBase; | ||
use Drupal\Core\Entity\Annotation\ConfigEntityType; | ||
|
||
/** | ||
* Defines the RDF entity graph config entity. | ||
* | ||
* Used to store basic information about each RDF entity graph. | ||
* | ||
* @ConfigEntityType( | ||
* id = "rdf_entity_graph", | ||
* label = @Translation("RDF Graph"), | ||
* config_prefix = "graph", | ||
* entity_keys = { | ||
* "id" = "id", | ||
* "label" = "name", | ||
* "status" = "status" | ||
* }, | ||
* config_export = { | ||
* "id", | ||
* "name", | ||
* "description", | ||
* }, | ||
* ) | ||
*/ | ||
class RdfEntityGraph extends ConfigEntityBase { | ||
|
||
/** | ||
* Default graph. | ||
* | ||
* @var string | ||
*/ | ||
const DEFAULT = 'default'; | ||
|
||
/** | ||
* The unique ID of this RDF entity graph. | ||
* | ||
* @var string | ||
*/ | ||
protected $id; | ||
|
||
/** | ||
* The label of the RDF entity graph. | ||
* | ||
* @var string | ||
*/ | ||
protected $name; | ||
|
||
/** | ||
* The description of the RDF entity graph. | ||
* | ||
* @var string | ||
*/ | ||
protected $description; | ||
|
||
} |