You are here

function _ctools_drush_export_op_alias in Chaos Tool Suite (ctools) 7

Return an alias for an op, that will be used to show as output. For now, this is mainly necessary for delete => revert alias.

Parameters

$op: The op name. Such as 'enable', 'disable', or 'delete'.

Return value

The matched alias value or the original $op passed in if not found.

2 calls to _ctools_drush_export_op_alias()
ctools_drush_export_op_command in drush/ctools.drush.inc
Drush callback: Acts as the hub for all op commands to keep all arg handling etc in one place.
_ctools_drush_export_op_command_logic in drush/ctools.drush.inc
Helper function to abstract logic for selecting exportable types/objects from individual commands as they will all share this same error handling/arguments for returning list of exportables.

File

drush/ctools.drush.inc, line 929
CTools Drush commands.

Code

function _ctools_drush_export_op_alias($op) {
  $aliases = array(
    'delete' => 'revert',
  );
  if (isset($aliases[$op])) {
    return $aliases[$op];
  }
  return $op;
}