comparison vendor/chi-teck/drupal-code-generator/src/Command/GeneratorInterface.php @ 0:c75dbcec494b

Initial commit from drush-created site
author Chris Cannam
date Thu, 05 Jul 2018 14:24:15 +0000
parents
children
comparison
equal deleted inserted replaced
-1:000000000000 0:c75dbcec494b
1 <?php
2
3 namespace DrupalCodeGenerator\Command;
4
5 /**
6 * Defines generator interface.
7 */
8 interface GeneratorInterface {
9
10 /**
11 * Returns command label.
12 *
13 * @return string|null
14 * A label suitable for navigation command.
15 */
16 public function getLabel();
17
18 /**
19 * Returns list of assets to dump.
20 *
21 * @return \DrupalCodeGenerator\Asset[]
22 * An array of assets.
23 */
24 public function getAssets();
25
26 /**
27 * Sets working directory.
28 *
29 * @param string|null $directory
30 * The working directory.
31 */
32 public function setDirectory($directory);
33
34 /**
35 * Returns current working directory.
36 *
37 * @return string|null
38 * The directory.
39 */
40 public function getDirectory();
41
42 /**
43 * Sets destination.
44 *
45 * @param mixed $destination
46 * The destination.
47 */
48 public function setDestination($destination);
49
50 /**
51 * Returns destination.
52 *
53 * @return mixed
54 * The recommended destination for dumped files.
55 * This value can be handy to determine the nature of the generated code
56 * (module, theme, etc). The DCG itself does not make use of it when saving
57 * files because of lack of Drupal context however all its generators have
58 * this property configured.
59 * The destination format is as follows:
60 * - modules (new module)
61 * - modules/% (existing module)
62 * - themes (new theme)
63 * - themes/% (existing theme)
64 * - profiles (new profile)
65 * - sites/default
66 * Note that the paths without leading slash are related to Drupal root
67 * directory.
68 */
69 public function getDestination();
70
71 }