You are here

interface PatternSourceInterface in UI Patterns 8

Defines an interface for UI Patterns Source plugins.

Hierarchy

Expanded class hierarchy of PatternSourceInterface

All classes that implement PatternSourceInterface

File

src/Plugin/PatternSourceInterface.php, line 8

Namespace

Drupal\ui_patterns\Plugin
View source
interface PatternSourceInterface {

  /**
   * Source field factory method.
   *
   * @param string $name
   *   Machine name.
   * @param string $label
   *   Human readable label.
   *
   * @return \Drupal\ui_patterns\Definition\PatternSourceField
   *   Source field instance.
   */
  public function getSourceField($name, $label);

  /**
   * Return list of source fields.
   *
   * @return \Drupal\ui_patterns\Definition\PatternSourceField[]
   *   List of source fields.
   */
  public function getSourceFields();

  /**
   * Get context property value, if any.
   *
   * @param string $name
   *   Context property name.
   *
   * @return mixed
   *   Context property value.
   */
  public function getContextProperty($name);

}

Members

Namesort descending Modifiers Type Description Overrides
PatternSourceInterface::getContextProperty public function Get context property value, if any. 1
PatternSourceInterface::getSourceField public function Source field factory method. 1
PatternSourceInterface::getSourceFields public function Return list of source fields. 5