Tripal
Public Member Functions | Static Public Member Functions | Static Public Attributes | Protected Attributes | List of all members
sbo__relationship Class Reference
Inheritance diagram for sbo__relationship:
Inheritance graph
[legend]
Collaboration diagram for sbo__relationship:
Collaboration graph
[legend]

Public Member Functions

 elementInfo ()
 
 __construct ($field, $instance)
 
 load ($entity)
 
 query ($query, $condition)
 
 instanceSettingsForm ()
 
 instanceSettingsFormValidate ($form, &$form_state)
 
 validate ($entity_type, $entity, $langcode, $items, &$errors)
 
 validateItem ($item, $chado_record_id=NULL)
 
 queryOrder ($query, $order)
 
 getRelTableSchema ()
 
 getBaseTableSchema ()
 
 getSubjectIdColumn ()
 
 getObjectIdColumn ()
 
 getBaseNameColumns ()
 
 getBaseTypeColumn ()
 
- Public Member Functions inherited from ChadoField
 getValueList ($options=[], $keyword=NULL)
 
- Public Member Functions inherited from TripalField
 getFieldName ()
 
 getField ()
 
 getInstance ()
 
 getFieldTerm ()
 
 getFieldTermID ()
 
 webServicesData ()
 
 viewsData ($view_base_id)
 
 settingsForm ($has_data)
 
 settingsFormValidate ($form, &$form_state)
 
 settingsTheme ($element)
 
 createInstance ()
 

Static Public Member Functions

static get_rel_verb ($rel_type)
 
- Static Public Member Functions inherited from TripalField
static info ()
 

Static Public Attributes

static $default_label = 'Relationship'
 
static $description = 'Relationships between records.'
 
static $default_instance_settings
 
static $default_widget = 'sbo__relationship_widget'
 
static $default_formatter = 'sbo__relationship_formatter'
 
- Static Public Attributes inherited from ChadoField
static $default_label = 'Chado Field'
 
static $default_description = 'The generic base class for all Chado fields. Replace this text as appropriate for the child implementation.'
 
static $default_settings
 
static $default_instance_settings
 
static $download_formatters
 
static $module = 'tripal_chado'
 
- Static Public Attributes inherited from TripalField
static $default_label = 'Tripal Field'
 
static $default_description = 'The generic base class for all Tripal fields. Replace this text as appropriate for the child implementation.'
 
static $default_settings
 
static $default_instance_settings
 
static $download_formatters
 
static $default_widget = ''
 
static $default_formatter = ''
 
static $module = 'tripal'
 
static $no_ui = TRUE
 
static $no_data = FALSE
 

Protected Attributes

 $field
 
 $instance
 
 $base_name_columns
 
 $base_type_column
 
 $schema
 
 $base_schema
 
 $subject_id_column
 
 $object_id_column
 
- Protected Attributes inherited from TripalField
 $field
 
 $instance
 
 $term
 

Additional Inherited Members

- Protected Member Functions inherited from ChadoField
 queryJoinOnce ($query, $table, $alias, $condition, $type='INNER')
 
- Protected Member Functions inherited from TripalField
 _addWebServiceElement (&$searchable_keys, &$sortable_keys, $parent_term_name, $parent_term, $element_name, $element_details)
 
 _addViewsDataElement (&$data, $view_base_id, $parent, $element_name, $element_details)
 

Constructor & Destructor Documentation

◆ __construct()

sbo__relationship::__construct (   $field,
  $instance 
)

Extends TripalField::__construct().

Reimplemented from TripalField.

Member Function Documentation

◆ elementInfo()

sbo__relationship::elementInfo ( )
See also
TripalField::elements()

Reimplemented from TripalField.

◆ get_rel_verb()

static sbo__relationship::get_rel_verb (   $rel_type)
static

A helper function to define English verbs for relationship types.

Parameters
$rel_typeThe vocabulary term name for the relationship.
Returns
The verb to use when creating a sentence of the relationship.

◆ getBaseNameColumns()

sbo__relationship::getBaseNameColumns ( )

Retrieve the base name columns.

◆ getBaseTypeColumn()

sbo__relationship::getBaseTypeColumn ( )

Retrieve the base type column.

◆ getRelTableSchema()

sbo__relationship::getRelTableSchema ( )

Retrieve the schema's

◆ getSubjectIdColumn()

sbo__relationship::getSubjectIdColumn ( )

Retrieve the subject/object key columns.

◆ instanceSettingsForm()

sbo__relationship::instanceSettingsForm ( )
See also
TripalField::settingsForm()

Reimplemented from ChadoField.

◆ instanceSettingsFormValidate()

sbo__relationship::instanceSettingsFormValidate (   $form,
$form_state 
)
Parameters
unknown$form
unknown$form_state

Reimplemented from TripalField.

◆ load()

sbo__relationship::load (   $entity)
See also
TripalField::load()

Reimplemented from TripalField.

◆ query()

sbo__relationship::query (   $query,
  $condition 
)
See also
ChadoField::query()

Reimplemented from ChadoField.

◆ queryOrder()

sbo__relationship::queryOrder (   $query,
  $order 
)
See also
ChadoField::queryOrder()

Reimplemented from ChadoField.

◆ validate()

sbo__relationship::validate (   $entity_type,
  $entity,
  $langcode,
  $items,
$errors 
)
See also
TripalField::validate()

Reimplemented from TripalField.

◆ validateItem()

sbo__relationship::validateItem (   $item,
  $chado_record_id = NULL 
)

Validate a Single relationship.

Parameters
$itemA single item from the $items array passed to TripalField::validate().
Returns
An array of errors where each has a:
  • error: this is an error code which is the name of the field.
  • message: A message to show the user describing the problem.

Member Data Documentation

◆ $default_instance_settings

sbo__relationship::$default_instance_settings
static
Initial value:
= [
'term_vocabulary' => 'SBO',
'term_name' => 'Relationship',
'term_accession' => '0000374',
'term_fixed' => FALSE,
'auto_attach' => FALSE,
'relationships' => [
'option1_vocabs' => '',
'option2_vocab' => '',
'option2_parent' => '',
'relationship_types' => '',
],
'items_per_page' => 10,
]

The documentation for this class was generated from the following file: