Move Season taxonomy and date range field to new Farm Season module.
This commit is contained in:
parent
a9d494f419
commit
5e7dd810da
|
@ -17,7 +17,7 @@ dependencies[] = farm_log
|
|||
dependencies[] = farm_log_movement
|
||||
dependencies[] = farm_map
|
||||
dependencies[] = farm_quantity
|
||||
dependencies[] = farm_taxonomy
|
||||
dependencies[] = farm_season
|
||||
dependencies[] = features
|
||||
dependencies[] = field_collection
|
||||
dependencies[] = field_group
|
||||
|
|
|
@ -1,13 +1,13 @@
|
|||
<?php
|
||||
/**
|
||||
* @file
|
||||
* farm_taxonomy.features.field_instance.inc
|
||||
* farm_season.features.field_instance.inc
|
||||
*/
|
||||
|
||||
/**
|
||||
* Implements hook_field_default_field_instances().
|
||||
*/
|
||||
function farm_taxonomy_field_default_field_instances() {
|
||||
function farm_season_field_default_field_instances() {
|
||||
$field_instances = array();
|
||||
|
||||
// Exported field_instance: 'taxonomy_term-farm_season-field_farm_date_range'.
|
|
@ -0,0 +1,14 @@
|
|||
<?php
|
||||
/**
|
||||
* @file
|
||||
* farm_season.features.inc
|
||||
*/
|
||||
|
||||
/**
|
||||
* Implements hook_ctools_plugin_api().
|
||||
*/
|
||||
function farm_season_ctools_plugin_api($module = NULL, $api = NULL) {
|
||||
if ($module == "strongarm" && $api == "strongarm") {
|
||||
return array("version" => "1");
|
||||
}
|
||||
}
|
|
@ -0,0 +1,36 @@
|
|||
<?php
|
||||
/**
|
||||
* @file
|
||||
* farm_season.features.taxonomy.inc
|
||||
*/
|
||||
|
||||
/**
|
||||
* Implements hook_taxonomy_default_vocabularies().
|
||||
*/
|
||||
function farm_season_taxonomy_default_vocabularies() {
|
||||
return array(
|
||||
'farm_season' => array(
|
||||
'name' => 'Farm Season',
|
||||
'machine_name' => 'farm_season',
|
||||
'description' => 'A list of farm seasons.',
|
||||
'hierarchy' => 0,
|
||||
'module' => 'taxonomy',
|
||||
'weight' => 0,
|
||||
'rdf_mapping' => array(
|
||||
'rdftype' => array(
|
||||
0 => 'skos:ConceptScheme',
|
||||
),
|
||||
'name' => array(
|
||||
'predicates' => array(
|
||||
0 => 'dc:title',
|
||||
),
|
||||
),
|
||||
'description' => array(
|
||||
'predicates' => array(
|
||||
0 => 'rdfs:comment',
|
||||
),
|
||||
),
|
||||
),
|
||||
),
|
||||
);
|
||||
}
|
|
@ -0,0 +1,17 @@
|
|||
name = Farm Season
|
||||
description = Provides a taxonomy and fields for organizing assets and logs by season.
|
||||
core = 7.x
|
||||
package = farmOS
|
||||
dependencies[] = ctools
|
||||
dependencies[] = date
|
||||
dependencies[] = date_popup
|
||||
dependencies[] = farm_fields
|
||||
dependencies[] = features
|
||||
dependencies[] = pathauto
|
||||
dependencies[] = strongarm
|
||||
dependencies[] = taxonomy
|
||||
features[ctools][] = strongarm:strongarm:1
|
||||
features[features_api][] = api:2
|
||||
features[field_instance][] = taxonomy_term-farm_season-field_farm_date_range
|
||||
features[taxonomy][] = farm_season
|
||||
features[variable][] = pathauto_taxonomy_term_farm_season_pattern
|
|
@ -0,0 +1,7 @@
|
|||
<?php
|
||||
/**
|
||||
* @file
|
||||
* Code for the Farm Season feature.
|
||||
*/
|
||||
|
||||
include_once 'farm_season.features.inc';
|
|
@ -0,0 +1,21 @@
|
|||
<?php
|
||||
/**
|
||||
* @file
|
||||
* farm_season.strongarm.inc
|
||||
*/
|
||||
|
||||
/**
|
||||
* Implements hook_strongarm().
|
||||
*/
|
||||
function farm_season_strongarm() {
|
||||
$export = array();
|
||||
|
||||
$strongarm = new stdClass();
|
||||
$strongarm->disabled = FALSE; /* Edit this to true to make a default strongarm disabled initially */
|
||||
$strongarm->api_version = 1;
|
||||
$strongarm->name = 'pathauto_taxonomy_term_farm_season_pattern';
|
||||
$strongarm->value = 'farm/season/[term:name]';
|
||||
$export['pathauto_taxonomy_term_farm_season_pattern'] = $strongarm;
|
||||
|
||||
return $export;
|
||||
}
|
|
@ -55,28 +55,5 @@ function farm_taxonomy_taxonomy_default_vocabularies() {
|
|||
),
|
||||
),
|
||||
),
|
||||
'farm_season' => array(
|
||||
'name' => 'Farm Season',
|
||||
'machine_name' => 'farm_season',
|
||||
'description' => 'A list of farm seasons.',
|
||||
'hierarchy' => 0,
|
||||
'module' => 'taxonomy',
|
||||
'weight' => 0,
|
||||
'rdf_mapping' => array(
|
||||
'rdftype' => array(
|
||||
0 => 'skos:ConceptScheme',
|
||||
),
|
||||
'name' => array(
|
||||
'predicates' => array(
|
||||
0 => 'dc:title',
|
||||
),
|
||||
),
|
||||
'description' => array(
|
||||
'predicates' => array(
|
||||
0 => 'rdfs:comment',
|
||||
),
|
||||
),
|
||||
),
|
||||
),
|
||||
);
|
||||
}
|
||||
|
|
|
@ -3,19 +3,13 @@ description = Common farm taxonomies.
|
|||
core = 7.x
|
||||
package = farmOS
|
||||
dependencies[] = ctools
|
||||
dependencies[] = date
|
||||
dependencies[] = date_popup
|
||||
dependencies[] = farm_fields
|
||||
dependencies[] = features
|
||||
dependencies[] = pathauto
|
||||
dependencies[] = strongarm
|
||||
dependencies[] = taxonomy
|
||||
features[ctools][] = strongarm:strongarm:1
|
||||
features[features_api][] = api:2
|
||||
features[field_instance][] = taxonomy_term-farm_season-field_farm_date_range
|
||||
features[taxonomy][] = farm_log_categories
|
||||
features[taxonomy][] = farm_materials
|
||||
features[taxonomy][] = farm_season
|
||||
features[variable][] = pathauto_taxonomy_term_farm_log_categories_pattern
|
||||
features[variable][] = pathauto_taxonomy_term_farm_materials_pattern
|
||||
features[variable][] = pathauto_taxonomy_term_farm_season_pattern
|
||||
|
|
|
@ -24,12 +24,5 @@ function farm_taxonomy_strongarm() {
|
|||
$strongarm->value = 'farm/material/[term:name]';
|
||||
$export['pathauto_taxonomy_term_farm_materials_pattern'] = $strongarm;
|
||||
|
||||
$strongarm = new stdClass();
|
||||
$strongarm->disabled = FALSE; /* Edit this to true to make a default strongarm disabled initially */
|
||||
$strongarm->api_version = 1;
|
||||
$strongarm->name = 'pathauto_taxonomy_term_farm_season_pattern';
|
||||
$strongarm->value = 'farm/season/[term:name]';
|
||||
$export['pathauto_taxonomy_term_farm_season_pattern'] = $strongarm;
|
||||
|
||||
return $export;
|
||||
}
|
||||
|
|
Loading…
Reference in New Issue