{"id":16363019,"url":"https://github.com/dpi/relation","last_synced_at":"2026-01-29T06:30:19.542Z","repository":{"id":136996110,"uuid":"1438454","full_name":"dpi/Relation","owner":"dpi","description":null,"archived":false,"fork":false,"pushed_at":"2013-04-08T12:12:40.000Z","size":692,"stargazers_count":0,"open_issues_count":1,"forks_count":0,"subscribers_count":3,"default_branch":"dpi","last_synced_at":"2025-02-18T03:02:25.908Z","etag":null,"topics":[],"latest_commit_sha":null,"homepage":"http://drupal.org/project/relation","language":"PHP","has_issues":true,"has_wiki":null,"has_pages":null,"mirror_url":null,"source_name":null,"license":null,"status":null,"scm":"git","pull_requests_enabled":true,"icon_url":"https://github.com/dpi.png","metadata":{"files":{"readme":"README.txt","changelog":"CHANGELOG.txt","contributing":null,"funding":null,"license":null,"code_of_conduct":null,"threat_model":null,"audit":null,"citation":null,"codeowners":null,"security":null,"support":null}},"created_at":"2011-03-04T07:22:45.000Z","updated_at":"2022-06-01T09:32:00.000Z","dependencies_parsed_at":"2023-03-14T01:30:57.388Z","dependency_job_id":null,"html_url":"https://github.com/dpi/Relation","commit_stats":null,"previous_names":[],"tags_count":0,"template":false,"template_full_name":null,"repository_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/dpi%2FRelation","tags_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/dpi%2FRelation/tags","releases_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/dpi%2FRelation/releases","manifests_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/dpi%2FRelation/manifests","owner_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners/dpi","download_url":"https://codeload.github.com/dpi/Relation/tar.gz/refs/heads/dpi","host":{"name":"GitHub","url":"https://github.com","kind":"github","repositories_count":239776289,"owners_count":19695073,"icon_url":"https://github.com/github.png","version":null,"created_at":"2022-05-30T11:31:42.601Z","updated_at":"2022-07-04T15:15:14.044Z","host_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub","repositories_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories","repository_names_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repository_names","owners_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners"}},"keywords":[],"created_at":"2024-10-11T02:26:14.731Z","updated_at":"2026-01-29T06:30:19.497Z","avatar_url":"https://github.com/dpi.png","language":"PHP","funding_links":[],"categories":[],"sub_categories":[],"readme":"\n-- SUMMARY --\n\nDescribes relationships between entities.\n\nThe intent of this module is to provide an API that describes the relationships\nbetween Drupal entities. For example:\n  comments \u003c--\u003e nodes\n  nodes \u003c--\u003e authors\n  terms \u003c--\u003e nodes\n  files \u003c--\u003e users\n  files \u003c--\u003e nodes\n\nSome of these relationships are hard-coded properties of an entity; for example,\nnodes have an author, a creation date, and a last updated date. Other\nrelationships exist because of field values; putting a filefield on a node type\ncreates a relationship between file entities and node type entities. An\nentity_reference module could explicitly define relationships between entities.\n\nThis module treats entity relationships as an entity type themselves. Types of\nrelationships are bundles. Each bundle describes the predicate of an RDF triple;\nthe two entites are the subject and object.\n\n  Entity relationship type    = SUBJECT   + PREDICATE      + OBJECT\n  Node author relationship    = node      + creator        + user\n  Taxonomy field relationship = blog post + is tagged with + some term\n\nThere is a distinction between relationships that are defined by the properties\nor behavior of an entity type and relationships that are defined per bundle. We\nthink we can relate these ways:\n\n  entity type \u003c--\u003e entity type\n  bundle \u003c--\u003e bundle\n\nBut not these:\n  entity type \u003c--\u003e bundle\n\n...because entity types are not extensible in the way that bundles are\nextensible via the core Field API. Entity type relationships will need to be\npre-defined, since they're infrastructure; we can describe them but not extend\nthem. Bundle relationships should be inferred from whatever field configuration\nis present on any particular Drupal installation, and users will be able to\ncreate and edit relationships between bundles.\n\nAn entity relationship API will let us visualize the content model of a Drupal\nsite. With this, we could export an RDF schema of the entire content model of a\nsite; we could build a \"content explorer\" that shows the linkings from any one\npiece of content (a user -\u003e their nodes -\u003e a particular node -\u003e a term -\u003e nodes\ntagged with that term). The first milestone for this module is to provide simple\nblocks that display specific corners of this graph, like a user's nodes, and\nterms a user has used. In the future, we would like to be able to add filters to\nthe graph (like \"a users nodes\" + \"only blog posts\").\n\nDrupal core defines several entity types:\n- user\n- node\n- comment\n- taxonomy\n- file (within system.module's hook_entity_info())\n\nSome related discussions/projects:\n- http://drupal.org/node/533222 (nodereference/userreference fields in D7)\n- http://drupal.org/project/entity (Entity API)\n- http://drupal.org/project/commentreference (CCK Comment Reference)\n- http://drupal.pastebin.com/avnKvCD0 (notes from chx)\n\nA little more thinking/rephrasing...\n\nRelationship data may not be stored by awesomerelationships itself;\nawesomerelationships will provide a way for entity or field providers to\ndescribe any relationships they may create. This way, we can query\nawesomerelationships' relationship API about any relationship on the site.\n\nThe awesomerelationships module should be able to ask the relationship bundle\nprovider things like:\n- what is your subject type + predicate + object type?\n- what relationships of your type exist, given a set of subject or object ids?\n  -\u003e what relationships of your type exist for subject id *?\n  -\u003e what relationships of your type exist for object id (123, 456, 78, 9)?\n\nWe will be able to ask awesomerelationships' relationship API about what\nrelationships exist, like \"given entity type X, find all relationship bundles\nwhere X is the subject (or object, or either)\".\n\nThe relationship API will find the shortest path between entities:\n  get_relationship('subject_type', 'object_type')\n  get_relationship(user, node)  ~~~\u003e user --\u003e node\n  get_relationship(user, term) ~~~\u003e user --\u003e node --\u003e term\n  get_relationship(user, file, term) ~~~\u003e user --\u003e file --\u003e node --\u003e term\n\n\nFor a full description of the module, visit the project page:\n  http://drupal.org/project/relation\nTo submit bug reports and feature suggestions, or to track changes:\n  http://drupal.org/project/issues/relation\n\n\n-- REQUIREMENTS --\n\n* @todo\n\n\n-- INSTALLATION --\n\n* Install as usual, see http://drupal.org/node/70151 for further information.\n\n\n-- CONFIGURATION --\n\n* @todo\n\n\n-- USAGE --\n\n* @todo\n\n\n-- CONTACT --\n\nCurrent maintainers:\n* Daniel F. Kudwien (sun) - http://drupal.org/user/54136\n\n","project_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fdpi%2Frelation","html_url":"https://awesome.ecosyste.ms/projects/github.com%2Fdpi%2Frelation","lists_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fdpi%2Frelation/lists"}