pattern_library-8.x-2.x-dev/src/Plugin/PatternInterface.php

src/Plugin/PatternInterface.php
<?php

namespace Drupal\pattern_library\Plugin;

/**
 * Define the library pattern interface.
 */
interface PatternInterface {

  /**
   * Get pattern library label.
   *
   * @return string
   *   The pattern library label.
   *
   * @throws \Drupal\Core\TypedData\Exception\MissingDataException
   * @throws \Drupal\pattern_library\Exception\InvalidPatternException
   */
  public function getLabel();

  /**
   * Get pattern library source.
   *
   * @return string
   *   The pattern library source.
   *
   * @throws \Drupal\Core\TypedData\Exception\MissingDataException
   * @throws \Drupal\pattern_library\Exception\InvalidPatternException
   */
  public function getSource();

  /**
   * Get pattern library styles.
   *
   * @return array
   *   An array of pattern library styles.
   *
   * @throws \Drupal\Core\TypedData\Exception\MissingDataException
   * @throws \Drupal\pattern_library\Exception\InvalidPatternException
   */
  public function getStyles();

  /**
   * Get pattern library icon path.
   *
   * @return string
   *   The pattern library icon path.
   *
   * @throws \Drupal\Core\TypedData\Exception\MissingDataException
   * @throws \Drupal\pattern_library\Exception\InvalidPatternException
   */
  public function getIcon();

  /**
   * Get pattern library icon map.
   *
   * @return array
   *   An array of the icon map.
   *
   * @throws \Drupal\Core\TypedData\Exception\MissingDataException
   * @throws \Drupal\pattern_library\Exception\InvalidPatternException
   */
  public function getIconMap();

  /**
   * Get the pattern library regions.
   *
   * @return array
   *   An array of pattern library regions.
   *
   * @throws \Drupal\Core\TypedData\Exception\MissingDataException
   * @throws \Drupal\pattern_library\Exception\InvalidPatternException
   */
  public function getRegions();

  /**
   * Get the pattern library layout regions.
   *
   * @return array
   *   An array of layout regions that follow the layout API structure.
   *
   * @throws \Drupal\Core\TypedData\Exception\MissingDataException
   * @throws \Drupal\pattern_library\Exception\InvalidPatternException
   */
  public function getLayoutRegions();

  /**
   * Get the region library modifier.
   *
   * @param $region
   *   The region machine name.
   *
   * @return array
   *   An array of the region library modifiers.
   *
   * @throws \Drupal\Core\TypedData\Exception\MissingDataException
   * @throws \Drupal\pattern_library\Exception\InvalidPatternException
   */
  public function getRegionModifier($region);

  /**
   * Pattern library key.
   *
   * @return string
   *   The pattern library key.
   */
  public function libraryKey();

  /**
   * Get pattern library libraries.
   *
   * Follows the same structure as the Drupal core libraries definition.
   *
   * @return array
   *   An array of the library structure.
   *
   * @throws \Drupal\Core\TypedData\Exception\MissingDataException
   * @throws \Drupal\pattern_library\Exception\InvalidPatternException
   */
  public function getLibraries();

  /**
   * Has pattern library libraries.
   *
   * @return boolean
   *    Return TRUE if the pattern libraries have been defined.
   *
   * @throws \Drupal\Core\TypedData\Exception\MissingDataException
   * @throws \Drupal\pattern_library\Exception\InvalidPatternException
   */
  public function hasLibraries();

  /**
   * Get pattern library provider.
   *
   * @return string
   *   The pattern library plugin provider.
   */
  public function getProvider();

  /**
   * Determine if pattern is valid.
   *
   * @return boolean
   *   Return TRUE if the patten is valid; otherwise FALSE.
   */
  public function validate();

}

Главная | Обратная связь

drupal hosting | друпал хостинг | it patrol .inc