You are here

function backup_migrate_location::get_action_links in Backup and Migrate 8.3

Same name and namespace in other branches
  1. 6.3 includes/locations.inc \backup_migrate_location::get_action_links()
  2. 7.3 includes/locations.inc \backup_migrate_location::get_action_links()

Get the action links for a location.

Overrides backup_migrate_item::get_action_links

1 call to backup_migrate_location::get_action_links()
backup_migrate_destination::get_action_links in includes/destinations.inc
Get the action links for a destination.
1 method overrides backup_migrate_location::get_action_links()
backup_migrate_destination::get_action_links in includes/destinations.inc
Get the action links for a destination.

File

includes/locations.inc, line 247

Class

backup_migrate_location
A base class for creating locations.

Code

function get_action_links() {
  $out = parent::get_action_links();
  $item_id = $this
    ->get_id();

  // Don't display the download/delete/restore ops if they are not available for this location.
  if ($this
    ->op('list files') && user_access("access backup files")) {
    $out = array(
      'list files' => l(t("list files"), BACKUP_MIGRATE_MENU_PATH . "/{$this->type_name}/list/files/" . $item_id),
    ) + $out;
  }
  if (!$this
    ->op('configure') || !user_access('administer backup and migrate')) {
    unset($out['edit']);
  }
  return $out;
}