farm_water_test.module in farmOS 7
File
modules/farm/farm_water/farm_water_test/farm_water_test.module
View source
<?php
include_once 'farm_water_test.features.inc';
function farm_water_test_farm_ui_entities() {
return array(
'log' => array(
'farm_water_test' => array(
'label' => t('Water test'),
'label_plural' => t('Water test'),
'view' => 'farm_water_test',
'farm_asset' => 'none',
'areas' => TRUE,
),
),
);
}
function farm_water_test_farm_log_categories_populate($log) {
$categories = array();
if ($log->type == 'farm_water_test') {
$categories[] = 'Water';
}
return $categories;
}
function farm_water_test_feeds_importer_default_alter(&$importers) {
$name = 'log_farm_water_test';
if (!empty($importers[$name])) {
$mappings = array(
array(
'source' => 'Laboratory',
'target' => 'field_farm_water_lab',
'unique' => FALSE,
),
);
$importer_mappings =& $importers[$name]->config['processor']['config']['mappings'];
$importer_mappings = array_merge($importer_mappings, $mappings);
}
}