function tripal_get_variable

2.x tripal_core.tripal_variables.api.inc tripal_get_variable($name)
3.x tripal.variables.api.inc tripal_get_variable($name)

Retrieves the variable name record.

Parameters

$name: The name of the variable to retrieve

Return value

A record object containg the variable.

Related topics

6 calls to tripal_get_variable()
tripal_add_node_variable in legacy/tripal_core/api/tripal_core.tripal_variables.api.inc
Associates a variable and it's value to a node.
tripal_delete_node_variables in legacy/tripal_core/api/tripal_core.tripal_variables.api.inc
Removes variables assigned to a node.
tripal_get_bundle_variable in tripal/api/tripal.entities.api.inc
Fetch the value for a given tripal variable.
tripal_get_node_variables in legacy/tripal_core/api/tripal_core.tripal_variables.api.inc
Returns one or more variables assigned to a node.
tripal_insert_variable in tripal/api/tripal.variables.api.inc
Adds a new variable name.

... See full list

File

tripal/api/tripal.variables.api.inc, line 76
Provides an application programming interface (API) for managing variables associated with Tripal managed content.

Code

function tripal_get_variable($name) {
  return db_select('tripal_variables', 'v')
    ->fields('v')
    ->condition('name', $name)
    ->execute()
    ->fetchObject();
}