You are here

interface VoteUpDownWidgetInterface in Vote Up/Down 8

Defines an interface for Vote Up/Down Widget plugins.

@todo Finish documentation.

Hierarchy

Expanded class hierarchy of VoteUpDownWidgetInterface

All classes that implement VoteUpDownWidgetInterface

File

src/Plugin/VoteUpDownWidgetInterface.php, line 13

Namespace

Drupal\vud\Plugin
View source
interface VoteUpDownWidgetInterface extends PluginInspectionInterface {

  /**
   * Returns the label of the specific plugin instance
   *
   * @return mixed
   */
  public function getWidgetId();

  /**
   * Returns the widget template for a specific plugin instance
   *
   * @return mixed
   */
  public function getWidgetTemplate();

  /**
   *
   * Array containing all info for a plugin instance
   * @param $variables
   *
   * @return mixed
   */
  public function alterTemplateVariables(&$variables);

  /**
   * Returns the path to the widget template to be used.
   *
   * @param $base_path
   * @param $variables
   *
   * @return array
   */
  public function getWidgetTemplateVars($base_path, &$variables);

  /**
   * Returns renderable array for the plugin
   *
   * @param $entity EntityInterface
   *
   * @return array
   */
  public function build($entity);

}

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
VoteUpDownWidgetInterface::alterTemplateVariables public function Array containing all info for a plugin instance 1
VoteUpDownWidgetInterface::build public function Returns renderable array for the plugin 1
VoteUpDownWidgetInterface::getWidgetId public function Returns the label of the specific plugin instance 1
VoteUpDownWidgetInterface::getWidgetTemplate public function Returns the widget template for a specific plugin instance 1
VoteUpDownWidgetInterface::getWidgetTemplateVars public function Returns the path to the widget template to be used. 1