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