farmOS/modules/farm/farm_soil/farm_soil_test/farm_soil_test.module

41 lines
813 B
Plaintext

<?php
/**
* @file
* Code for the Farm Soil Test feature.
*/
include_once 'farm_soil_test.features.inc';
/**
* Implements hook_farm_ui_entities().
*/
function farm_soil_test_farm_ui_entities() {
return array(
'log' => array(
'farm_soil_test' => array(
'label' => t('Soil test'),
'label_plural' => t('Soil tests'),
'view' => 'farm_log_soil_tests',
'farm_asset' => 'none',
'areas' => TRUE,
),
),
);
}
/**
* Implements hook_farm_taxonomy_term_view_views().
*/
function farm_soil_test_farm_taxonomy_term_view_views($term) {
// If the term is not an area, bail.
if ($term->vocabulary_machine_name != 'farm_areas') {
return array();
}
// Return a list of Views to include on Areas.
return array(
'farm_log_soil_tests',
);
}