Tripal
All Classes Files Functions Variables Modules Pages
Public Member Functions | Static Public Attributes | List of all members
WebServicesField Class Reference
Inheritance diagram for WebServicesField:
Inheritance graph
[legend]
Collaboration diagram for WebServicesField:
Collaboration graph
[legend]

Public Member Functions

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

Static Public Attributes

static $default_label = 'Remote Data'
 
static $default_description = ''
 
static $module = 'tripal_ws'
 
static $default_settings
 
static $default_instance_settings
 
- 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
 

Additional Inherited Members

- Static Public Member Functions inherited from TripalField
static info ()
 
- 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)
 
- Protected Attributes inherited from TripalField
 $field
 
 $instance
 
 $term
 

Member Function Documentation

◆ load()

WebServicesField::load (   $entity)

Loads the field values from the underlying data store.

Parameters
$entity
Returns
An array of the following format: $entity->{$field_name}['und'][0]['value'] = $value; where:
  • $entity is the entity object to which this field is attached.
  • $field_name is the name of this field
  • 'und' is the language code (in this case 'und' == undefined)
  • 0 is the cardinality. Increment by 1 when more than one item is available.
  • 'value' is the key indicating the value of this field. It should always be set. The value of the 'value' key will be the contents used for web services and for downloadable content. The value should be of the follow format types: 1) A single value (text, numeric, etc.) 2) An array of key value pair. 3) If multiple entries then cardinality should incremented and format types 1 and 2 should be used for each item. The array may contain as many other keys at the same level as 'value' but those keys are for internal field use and are not considered the value of the field.

Reimplemented from TripalField.

Reimplemented in remote__data.

Member Data Documentation

◆ $default_instance_settings

WebServicesField::$default_instance_settings
static
Initial value:
= [
'term_vocabulary' => 'schema',
'term_name' => 'Thing',
'term_accession' => 'Thing',
'term_fixed' => FALSE,
'auto_attach' => FALSE,
]

◆ $default_settings

WebServicesField::$default_settings
static
Initial value:
= [
'storage' => 'field_tripal_ws_storage',
'searchable_keys' => [],
]

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