Skip to content
This repository has been archived by the owner on Jul 26, 2019. It is now read-only.

Commit

Permalink
Adding site wide "controller" feature.
Browse files Browse the repository at this point in the history
We should have added this way earlier, but better late than never.
This feature will hold components that are strictly exportable and site-wide,
along with hooks and code to automate deployments.

references #80
  • Loading branch information
sumeetpareek committed Jan 14, 2014
1 parent efb1693 commit 5c38e0f
Show file tree
Hide file tree
Showing 5 changed files with 113 additions and 0 deletions.
Original file line number Diff line number Diff line change
@@ -0,0 +1,15 @@
<?php
/**
* @file
* f_site_controller.features.inc
*/

/**
* Implements hook_ctools_plugin_api().
*/
function f_site_controller_ctools_plugin_api() {
list($module, $api) = func_get_args();
if ($module == "strongarm" && $api == "strongarm") {
return array("version" => "1");
}
}
Original file line number Diff line number Diff line change
@@ -0,0 +1,37 @@
<?php
/**
* @file
* f_site_controller.features.taxonomy.inc
*/

/**
* Implements hook_taxonomy_default_vocabularies().
*/
function f_site_controller_taxonomy_default_vocabularies() {
return array(
'vocab_elections' => array(
'name' => 'Elections',
'machine_name' => 'vocab_elections',
'description' => 'Tags to associate content with a particular election. Like india-elections-2014 or delhi-elections-2013 etc.',
'hierarchy' => '0',
'module' => 'taxonomy',
'weight' => '0',
),
'vocab_pc' => array(
'name' => 'Parliament Constituencies',
'machine_name' => 'vocab_pc',
'description' => 'List of Parliament Constituencies of India',
'hierarchy' => '0',
'module' => 'taxonomy',
'weight' => '0',
),
'vocab_states' => array(
'name' => 'States',
'machine_name' => 'vocab_states',
'description' => 'List of states and union territories in India, to tag various content like candidates etc. ',
'hierarchy' => '0',
'module' => 'taxonomy',
'weight' => '0',
),
);
}
Original file line number Diff line number Diff line change
@@ -0,0 +1,19 @@
name = Site Controller
description = Holds site wide components and deployment related install hooks
core = 7.x
package = AAP Features
version = 7.x-1.0
project = f_site_controller
dependencies[] = ctools
dependencies[] = features
dependencies[] = metatag
dependencies[] = strongarm
dependencies[] = taxonomy
features[ctools][] = strongarm:strongarm:1
features[features_api][] = api:1
features[taxonomy][] = vocab_elections
features[taxonomy][] = vocab_pc
features[taxonomy][] = vocab_states
features[variable][] = pathauto_taxonomy_term_vocab_elections_pattern
features[variable][] = pathauto_taxonomy_term_vocab_pc_pattern
features[variable][] = pathauto_taxonomy_term_vocab_states_pattern
Original file line number Diff line number Diff line change
@@ -0,0 +1,7 @@
<?php
/**
* @file
* Code for the Site Controller feature.
*/

include_once 'f_site_controller.features.inc';
Original file line number Diff line number Diff line change
@@ -0,0 +1,35 @@
<?php
/**
* @file
* f_site_controller.strongarm.inc
*/

/**
* Implements hook_strongarm().
*/
function f_site_controller_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_vocab_elections_pattern';
$strongarm->value = 'election/[term:name]';
$export['pathauto_taxonomy_term_vocab_elections_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_vocab_pc_pattern';
$strongarm->value = 'parliament-constituency/[term:name]';
$export['pathauto_taxonomy_term_vocab_pc_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_vocab_states_pattern';
$strongarm->value = 'state/[term:name]';
$export['pathauto_taxonomy_term_vocab_states_pattern'] = $strongarm;

return $export;
}

0 comments on commit 5c38e0f

Please sign in to comment.