This repository has been archived by the owner on Nov 20, 2024. It is now read-only.
-
Notifications
You must be signed in to change notification settings - Fork 13
/
Copy pathVisualisationSourceInterface.php
69 lines (59 loc) · 1.75 KB
/
VisualisationSourceInterface.php
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
<?php
namespace Drupal\dvf\Plugin;
use Drupal\Component\Plugin\ConfigurableInterface;
use Drupal\Component\Plugin\DependentPluginInterface;
use Drupal\Component\Plugin\PluginInspectionInterface;
use Drupal\Core\Form\FormStateInterface;
/**
* Provides an interface defining a VisualisationSource plugin.
*/
interface VisualisationSourceInterface extends \Countable, \Iterator, ConfigurableInterface, DependentPluginInterface, PluginInspectionInterface {
/**
* Returns a form to configure settings for this plugin.
*
* @param array $form
* The form where the settings form is being included in.
* @param \Drupal\Core\Form\FormStateInterface $form_state
* The current state of the form.
*
* @return array
* An array of form elements.
*/
public function settingsForm(array $form, FormStateInterface $form_state);
/**
* Returns available fields on the source.
*
* @return array
* An array of available fields where the keys are the machine names
* and values are the labels.
*/
public function getFields();
/**
* Returns available records on the source.
*
* @return array
* An array of records.
*/
public function getRecords();
/**
* Returns the current visualisation.
*
* @return \Drupal\dvf\Plugin\VisualisationInterface
* Current visualisation instance.
*/
public function getVisualisation();
/**
* Returns the download url for the current source.
*
* @return string|null
* Returns a url to the data source or null if unavailable.
*/
public function getDownloadUrl();
/**
* Gets the cache expiry time from the DVF visualisation configuration.
*
* @return int
* The time the cache object expires.
*/
public function getCacheExpiry();
}