administer_relationships.inc

Version

1.46 (checked in on 2006/10/14 at 15:52:58 by dman)

Description

Supports the node-specific APIs and hooks for relationship Renders the relationship table form, validates and saves links against nodes.

A node can now have any number of 'statements' attached to it. A 'statement' is an RDF 'triple' relating one resource with another. EG, the "next" resource from page one is page two.

Simple and complex stuctures can be built from a collection of such relationships.

Primary statements behave as if they are attached directly to the subject - the node. They are exposed for editing in the node edit form and should be saved alongside it. Secondary statements are inferred from logical patterns, and although they may get stored in the node as $node->relationships during processing and rendering, they should not be saved unless you want every logical relationship to become explicit.

This file provides the actual relationship editing UI form, and not much else. To this end it uses the range_selectors.inc and combobox.js to provide the dynamic UI.

@package coders @author Dan Morrison http://coders.co.nz/ @version $Id: administer_relationships.inc,v 1.46 2006/10/14 15:52:58 dman Exp $

Constants

Namesort iconDescription
RELATIONSHIP_FILTER_INTRINSIC_VALUESIntrinsic values are those predicates that have a direct mapping with Drupal internals. Need to control access to this group. An intrinsic property is one that has a drupalEquiv mapping value set.
RELATIONSHIP_FILTER_TRIVIAL_VALUESTrivial values are predicates that have an importance/weight less than zero. This includes predicates that are only ever implied. They should be not show up on user edit forms

Functions

Namesort iconDescription
relationship_choose_resource_form
relationship_data_pageExpose all statements about any subject.
relationship_formGenerate a form for displaying and selecting relationships applying to a node.
relationship_form_submitA resource table has been submitted. Save the data. Often the tables will be incomplete, containing only the user-editable subset of the full data. So when saving statments, the database entries are updated, not replaced.
relationship_form_validateCheck the submission of any relationship table
relationship_list_allList everything about everything. Page.
relationship_list_statementsVanilla data dump of the statements about a given resource
relationship_merge_statements_into_resourceImport a resources statements into top-level properties.
relationship_terms_as_optionsConvert a list of term def objects into an array suitable for using in a select box.
_relationship_statement_fieldsGenerate form elements for defining relationships.