You are here

function config_pages_drush_command in Config Pages 8.3

Implements hook_drush_command().

File

./config_pages.drush.inc, line 13
Contains the code to generate the drush commands.

Code

function config_pages_drush_command() {
  $items = [];
  $items['config-pages-set-field-value'] = [
    'description' => 'Set a value for the field of Config Pages',
    'arguments' => [
      'bundle' => 'The type of config page "/admin/structure/config_pages/types"',
      'field_name' => 'The name of field',
      'value' => 'The value for the field',
    ],
    'options' => [
      'append' => 'Append to an existing value.',
    ],
    'drupal dependencies' => [
      'config_pages',
    ],
    'aliases' => [
      'cpsfv',
    ],
    'examples' => [
      'drush cpsfv bundle field_name value' => 'Set new value for field_name.',
      'drush cpsfv bundle field_name value --append' => 'Append a value to existing string.',
    ],
  ];
  $items['config-pages-get-field-value'] = [
    'description' => 'Get a value for the field of Config Pages',
    'arguments' => [
      'bundle' => 'The type of config page "/admin/structure/config_pages/types"',
      'field_name' => 'The name of field',
    ],
    'drupal dependencies' => [
      'config_pages',
    ],
    'aliases' => [
      'cpgfv',
    ],
  ];
  return $items;
}