41 lines
855 B
Plaintext
41 lines
855 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_ui_entity_views().
|
|
*/
|
|
function farm_soil_test_farm_ui_entity_views($entity_type, $bundle, $entity) {
|
|
$views = array();
|
|
|
|
// Return a list of Views to include on Areas.
|
|
if ($entity_type == 'taxonomy_term' && $entity->vocabulary_machine_name == 'farm_areas') {
|
|
$views[] = array(
|
|
'name' => 'farm_log_soil_tests',
|
|
);
|
|
}
|
|
|
|
return $views;
|
|
}
|