bakery.drush.inc in Bakery Single Sign-On System 7.2
Same filename and directory in other branches
Drush integration for Bakery.
File
bakery.drush.incView source
<?php
/**
* @file
* Drush integration for Bakery.
*/
/**
* Implements hook_drush_help().
*/
function bakery_drush_help($section) {
switch ($section) {
case 'drush:bakery-add-slave':
return dt('Update the Bakery configuration to add a slave site.');
}
}
/**
* Implements hook_drush_command().
*/
function bakery_drush_command() {
$items['bakery-add-slave'] = array(
'description' => 'Add a Bakery slave site.',
'arguments' => array(
'slave' => 'Slave site URL, starts with http and ending with /.',
),
);
return $items;
}
/**
* Drush command for adding new slave.
*/
function drush_bakery_add_slave($slave) {
$slaves = variable_get('bakery_slaves', array());
$slaves[] = $slave;
variable_set('bakery_slaves', $slaves);
}
Functions
Name | Description |
---|---|
bakery_drush_command | Implements hook_drush_command(). |
bakery_drush_help | Implements hook_drush_help(). |
drush_bakery_add_slave | Drush command for adding new slave. |