|
@@ -957,111 +957,4 @@ function tripal_stock_block ($op = 'list', $delta = 0, $edit=array()) {
|
|
|
return $block;
|
|
|
}
|
|
|
}
|
|
|
-}
|
|
|
-
|
|
|
-/**
|
|
|
- *
|
|
|
- *
|
|
|
- * @ingroup tripal_stock
|
|
|
- */
|
|
|
-function tripal_stock_preprocess(&$variables){
|
|
|
-
|
|
|
- // if the template file is the default node template file then we want
|
|
|
- // to add all of our variables.
|
|
|
- if($variables['template_files'][0] == 'node-chado_stock'){
|
|
|
- // stock properties
|
|
|
- $variables['node'] = tripal_core_expand_chado_vars($variables['node'], 'table', 'stockprop');
|
|
|
-
|
|
|
- // stock synonyms
|
|
|
- $variables['node']->stock->stock_synonyms = tripal_core_generate_chado_var(
|
|
|
- 'stockprop',
|
|
|
- array(
|
|
|
- 'stock_id'=>$variables['node']->stock->stock_id,
|
|
|
- 'type_id' => array(
|
|
|
- 'cv_id' => variable_get('chado_stock_prop_types_cv', 'null'),
|
|
|
- 'name' => 'synonym'
|
|
|
- ),
|
|
|
- )
|
|
|
- );
|
|
|
-
|
|
|
- // Stock database references
|
|
|
- $variables['node'] = tripal_core_expand_chado_vars($variables['node'], 'table', 'stock_dbxref');
|
|
|
-
|
|
|
- // Stock Object Relationships
|
|
|
- $variables['node']->stock->stock_object_relationships = tripal_core_generate_chado_var(
|
|
|
- 'stock_relationship',
|
|
|
- array('subject_id'=>$variables['node']->stock->stock_id)
|
|
|
- );
|
|
|
-
|
|
|
- // Stock Subject Relationships
|
|
|
- $variables['node']->stock->stock_subject_relationships = tripal_core_generate_chado_var(
|
|
|
- 'stock_relationship',
|
|
|
- array('object_id'=>$variables['node']->stock->stock_id)
|
|
|
- );
|
|
|
- }
|
|
|
-}
|
|
|
-
|
|
|
-/**
|
|
|
- *
|
|
|
- *
|
|
|
- * @ingroup tripal_stock
|
|
|
- */
|
|
|
-function tripal_stock_preprocess_tripal_stock_properties(&$variables){
|
|
|
- // stock properties
|
|
|
- $variables['node'] = tripal_core_expand_chado_vars($variables['node'], 'table', 'stockprop');
|
|
|
-}
|
|
|
-
|
|
|
-/**
|
|
|
- *
|
|
|
- *
|
|
|
- * @ingroup tripal_stock
|
|
|
- */
|
|
|
-function tripal_stock_preprocess_tripal_stock_synonyms(&$variables){
|
|
|
- // stock synonyms
|
|
|
- $variables['node']->stock->stock_synonyms = tripal_core_generate_chado_var(
|
|
|
- 'stockprop',
|
|
|
- array(
|
|
|
- 'stock_id'=>$variables['node']->stock->stock_id,
|
|
|
- 'type_id' => array(
|
|
|
- 'cv_id' => variable_get('chado_stock_prop_types_cv', 'null'),
|
|
|
- 'name' => 'synonym'
|
|
|
- ),
|
|
|
- )
|
|
|
- );
|
|
|
-}
|
|
|
-
|
|
|
-/**
|
|
|
- *
|
|
|
- *
|
|
|
- * @ingroup tripal_stock
|
|
|
- */
|
|
|
-function tripal_stock_preprocess_tripal_stock_references(&$variables){
|
|
|
- // Stock database references
|
|
|
- $variables['node'] = tripal_core_expand_chado_vars($variables['node'], 'table', 'stock_dbxref');
|
|
|
-}
|
|
|
-
|
|
|
-/**
|
|
|
- *
|
|
|
- *
|
|
|
- * @ingroup tripal_stock
|
|
|
- */
|
|
|
-function tripal_stock_preprocess_tripal_stock_relationships_as_object(&$variables){
|
|
|
- // Stock Object Relationships
|
|
|
- $variables['node']->stock->stock_object_relationships = tripal_core_generate_chado_var(
|
|
|
- 'stock_relationship',
|
|
|
- array('subject_id'=>$variables['node']->stock->stock_id)
|
|
|
- );
|
|
|
-}
|
|
|
-
|
|
|
-/**
|
|
|
- *
|
|
|
- *
|
|
|
- * @ingroup tripal_stock
|
|
|
- */
|
|
|
-function tripal_stock_preprocess_tripal_stock_relationships_as_subject(&$variables){
|
|
|
- // Stock Subject Relationships
|
|
|
- $variables['node']->stock->stock_subject_relationships = tripal_core_generate_chado_var(
|
|
|
- 'stock_relationship',
|
|
|
- array('object_id'=>$variables['node']->stock->stock_id)
|
|
|
- );
|
|
|
}
|