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.
4 calls to tripal_get_variable()
- tripal_add_node_variable in tripal_core/
api/ tripal_core.tripal_variables.api.inc - Associates a variable and it's value to a node.
- tripal_delete_node_variables in tripal_core/
api/ tripal_core.tripal_variables.api.inc - Removes variables assigned to a node.
- tripal_get_node_variables in tripal_core/
api/ tripal_core.tripal_variables.api.inc - Returns one or more variables assigned to a node.
- tripal_insert_variable in tripal_core/
api/ tripal_core.tripal_variables.api.inc - Adds a new variable name.
File
- tripal_core/
api/ tripal_core.tripal_variables.api.inc, line 73 - Provides an application programming interface (API) for managing variables associated with Tripal managed Drupal nodes/
Code
function tripal_get_variable($name) {
return db_select('tripal_variables', 'v')
->fields('v')
->condition('name', $name)
->execute()
->fetchObject();
}