2014-11-12 20:27:59 +01:00
|
|
|
<?php
|
|
|
|
/**
|
|
|
|
* @file
|
2015-04-22 04:58:42 +02:00
|
|
|
* farm_livestock.features.inc
|
2014-11-12 20:27:59 +01:00
|
|
|
*/
|
|
|
|
|
|
|
|
/**
|
|
|
|
* Implements hook_ctools_plugin_api().
|
|
|
|
*/
|
2015-06-11 21:13:36 +02:00
|
|
|
function farm_livestock_ctools_plugin_api($module = NULL, $api = NULL) {
|
2017-05-20 00:03:12 +02:00
|
|
|
if ($module == "field_group" && $api == "field_group") {
|
|
|
|
return array("version" => "1");
|
|
|
|
}
|
2014-11-12 20:27:59 +01:00
|
|
|
if ($module == "strongarm" && $api == "strongarm") {
|
|
|
|
return array("version" => "1");
|
|
|
|
}
|
|
|
|
}
|
|
|
|
|
2014-12-01 20:21:49 +01:00
|
|
|
/**
|
|
|
|
* Implements hook_views_api().
|
|
|
|
*/
|
2015-06-11 21:13:36 +02:00
|
|
|
function farm_livestock_views_api($module = NULL, $api = NULL) {
|
|
|
|
return array("api" => "3.0");
|
2014-12-01 20:21:49 +01:00
|
|
|
}
|
|
|
|
|
2014-11-12 20:27:59 +01:00
|
|
|
/**
|
|
|
|
* Implements hook_default_farm_asset_type().
|
|
|
|
*/
|
|
|
|
function farm_livestock_default_farm_asset_type() {
|
|
|
|
$items = array();
|
|
|
|
$items['animal'] = entity_import('farm_asset_type', '{
|
|
|
|
"type" : "animal",
|
|
|
|
"label" : "Animal",
|
|
|
|
"weight" : 0,
|
2017-10-12 19:34:43 +02:00
|
|
|
"inventory" : { "enabled" : "1", "individual" : "1" },
|
2014-11-12 20:27:59 +01:00
|
|
|
"rdf_mapping" : []
|
|
|
|
}');
|
|
|
|
return $items;
|
|
|
|
}
|
2016-06-08 19:17:48 +02:00
|
|
|
|
|
|
|
/**
|
|
|
|
* Implements hook_default_log_type().
|
|
|
|
*/
|
|
|
|
function farm_livestock_default_log_type() {
|
|
|
|
$items = array();
|
2018-02-21 22:31:20 +01:00
|
|
|
$items['farm_birth'] = entity_import('log_type', '{
|
|
|
|
"type" : "farm_birth",
|
|
|
|
"label" : "Birth",
|
|
|
|
"weight" : 0,
|
|
|
|
"name_pattern" : "Birth: [log:field-farm-asset]",
|
|
|
|
"name_edit" : "0",
|
|
|
|
"done" : "1",
|
|
|
|
"rdf_mapping" : []
|
|
|
|
}');
|
2016-06-08 19:17:48 +02:00
|
|
|
$items['farm_medical'] = entity_import('log_type', '{
|
|
|
|
"type" : "farm_medical",
|
|
|
|
"label" : "Medical",
|
|
|
|
"weight" : 0,
|
2017-05-20 16:41:41 +02:00
|
|
|
"name_pattern" : "Medical: [log:field-farm-asset] [log:timestamp:short]",
|
2016-06-08 19:17:48 +02:00
|
|
|
"name_edit" : "1",
|
|
|
|
"done" : "1",
|
|
|
|
"rdf_mapping" : []
|
|
|
|
}');
|
|
|
|
return $items;
|
|
|
|
}
|