You are here

VoteResultFunctionBase.php in Voting API 8.3

Namespace

Drupal\votingapi

File

src/VoteResultFunctionBase.php
View source
<?php

namespace Drupal\votingapi;

use Drupal\Core\Plugin\PluginBase;

/**
 * Base class for plugins which provide a function to compute the vote result.
 */
abstract class VoteResultFunctionBase extends PluginBase implements VoteResultFunctionInterface {

  /**
   * {@inheritdoc}
   */
  public function getLabel() {
    return $this
      ->t($this->pluginDefinition['label']);
  }

  /**
   * {@inheritdoc}
   */
  public function getDescription() {
    return $this
      ->t($this->pluginDefinition['description']);
  }

}

Classes

Namesort descending Description
VoteResultFunctionBase Base class for plugins which provide a function to compute the vote result.