interface ListableDestinationInterface in Backup and Migrate 5.0.x
Interface ListableDestinationInterface.
@package Drupal\backup_migrate\Core\Destination
Hierarchy
- interface \Drupal\backup_migrate\Core\Plugin\PluginInterface
- interface \Drupal\backup_migrate\Core\Destination\DestinationInterface
- interface \Drupal\backup_migrate\Core\Destination\ListableDestinationInterface
- interface \Drupal\backup_migrate\Core\Destination\DestinationInterface
Expanded class hierarchy of ListableDestinationInterface
All classes that implement ListableDestinationInterface
2 files declare their use of ListableDestinationInterface
- BackupController.php in src/
Controller/ BackupController.php - Schedule.php in src/
Entity/ Schedule.php
File
- src/
Core/ Destination/ ListableDestinationInterface.php, line 10
Namespace
Drupal\backup_migrate\Core\DestinationView source
interface ListableDestinationInterface extends DestinationInterface {
/**
* Return a list of files from the destination.
*
* This list should be date ordered from newest to oldest.
*
* @todo Decide if extended metadata should ALWAYS be loaded here. Is there
* a use case for getting a list of files WITHOUT metadata?
*
* @return \Drupal\backup_migrate\Core\File\BackupFileInterface[]
* An array of BackupFileInterface objects representing the files with
* the file ids as keys. The file ids are usually file names but that
* is up to the implementing destination to decide. The returned files
* may not be readable. Use loadFileForReading to get a readable file.
*/
public function listFiles();
/**
* Run a basic query with sort on the list of files.
*
* @param array $filters
* An array of metadata fields to filter by.
* @param string $sort
* A metadata field to sort by, defaults to 'datestamp'.
* @param int $sort_direction
* The direction to sort by, either SORT_ASC or SORT_DESC.
* @param int $count
* The number of records to obtain.
* @param int $start
* The first item to start the result set from.
*
* @return mixed
*/
public function queryFiles(array $filters = [], $sort = 'datestamp', $sort_direction = SORT_DESC, $count = 100, $start = 0);
/**
* @return int The number of files in the destination.
*/
public function countFiles();
/**
* Does the file with the given id (filename) exist in this destination.
*
* @param int $id
* The id (usually the filename) of the file.
*
* @return bool
* Whether the file exists in this destination.
*/
public function fileExists($id);
/**
* Delete the specified file.
*/
public function deleteFile($id);
}
Members
Name![]() |
Modifiers | Type | Description | Overrides |
---|---|---|---|---|
ListableDestinationInterface:: |
public | function | 1 | |
ListableDestinationInterface:: |
public | function | Delete the specified file. | |
ListableDestinationInterface:: |
public | function | Does the file with the given id (filename) exist in this destination. | |
ListableDestinationInterface:: |
public | function | Return a list of files from the destination. | 1 |
ListableDestinationInterface:: |
public | function | Run a basic query with sort on the list of files. | 1 |
PluginInterface:: |
public | function | What is the weight of the given operation for this plugin. | 1 |
PluginInterface:: |
public | function | Get a list of supported operations and their weight. | 1 |
PluginInterface:: |
public | function | Does this plugin implement the given operation. | 1 |