You are here

interface ViewsBuilderPluginInterface in Views Templates 8

Creates a common interface for Views Builder classes.

Hierarchy

Expanded class hierarchy of ViewsBuilderPluginInterface

All classes that implement ViewsBuilderPluginInterface

File

src/Plugin/ViewsBuilderPluginInterface.php, line 11

Namespace

Drupal\views_templates\Plugin
View source
interface ViewsBuilderPluginInterface extends PluginInspectionInterface {

  /**
   * Returns base table id.
   *
   * @return string
   *   Returns base table id.
   */
  public function getBaseTable();

  /**
   * Get template description.
   *
   * @return string
   *   Returns template description.
   */
  public function getDescription();

  /**
   * Get template admin label.
   *
   * @return string
   *   Returns template admin label.
   */
  public function getAdminLabel();

  /**
   * Get a value from the plugin definition.
   *
   * @param string $key
   *   The key to get the value from the plugin definition.
   *
   * @return mixed
   *   Returns a a value from the plugin definition.
   */
  public function getDefinitionValue($key);

  /**
   * Create a View. Don't save it.
   *
   * @param mixed $options
   *   Options to create a view.
   *
   * @return \Drupal\views\ViewEntityInterface
   *   Returns a view.
   */
  public function createView($options = NULL);

  /**
   * Return form elements of extra configuration when adding View from template.
   *
   * @param array $form
   *   The form in array.
   * @param \Drupal\Core\Form\FormStateInterface $form_state
   *   The values from the form.
   *
   * @return mixed
   *   Returns empty array.
   */
  public function buildConfigurationForm(array $form, FormStateInterface $form_state);

  /**
   * Determine if a template exists.
   *
   * @return bool
   *   Returns boolean value.
   */
  public function templateExists();

}

Members

Namesort descending Modifiers Type Description Overrides
PluginInspectionInterface::getPluginDefinition public function Gets the definition of the plugin implementation. 4
PluginInspectionInterface::getPluginId public function Gets the plugin_id of the plugin instance. 2
ViewsBuilderPluginInterface::buildConfigurationForm public function Return form elements of extra configuration when adding View from template. 1
ViewsBuilderPluginInterface::createView public function Create a View. Don't save it. 1
ViewsBuilderPluginInterface::getAdminLabel public function Get template admin label. 1
ViewsBuilderPluginInterface::getBaseTable public function Returns base table id. 1
ViewsBuilderPluginInterface::getDefinitionValue public function Get a value from the plugin definition. 1
ViewsBuilderPluginInterface::getDescription public function Get template description. 1
ViewsBuilderPluginInterface::templateExists public function Determine if a template exists. 1