You are here

class VoteResultFunction in Voting API 8.3

Defines a voting result annotation object.

Plugin Namespace: Plugin\votingapi\VoteResultFunction.

For a working example, see \Drupal\votingapi\Plugin\VoteResultFunction\Sum

Hierarchy

Expanded class hierarchy of VoteResultFunction

See also

hook_vote_result_info_alter()

\Drupal\votingapi\VoteResultFunctionInterface

\Drupal\votingapi\VoteResultFunctionBase

\Drupal\votingapi\VoteResultFunctionManager

Plugin API

1 file declares its use of VoteResultFunction
VoteResultFunctionManager.php in src/VoteResultFunctionManager.php
4 classes are annotated with VoteResultFunction
Average in src/Plugin/VoteResultFunction/Average.php
A sum of a set of votes.
Count in src/Plugin/VoteResultFunction/Count.php
A sum of a set of votes.
Sum in src/Plugin/VoteResultFunction/Sum.php
A sum of a set of votes.
Zebra in tests/modules/votingapi_test/src/Plugin/VoteResultFunction/Zebra.php
A test plugin for the Voting API module.

File

src/Annotation/VoteResultFunction.php, line 23

Namespace

Drupal\votingapi\Annotation
View source
class VoteResultFunction extends Plugin {

  /**
   * The plugin ID.
   *
   * @var string
   */
  public $id;

  /**
   * The human-readable name of the voting result.
   *
   * @var \Drupal\Core\Annotation\Translation
   *
   * @ingroup plugin_translatable
   */
  public $label;

  /**
   * A brief description of the voting result.
   *
   * @var \Drupal\Core\Annotation\Translation
   *
   * @ingroup plugin_translatable
   */
  public $description = '';

}

Members

Namesort descending Modifiers Type Description Overrides
Plugin::$definition protected property The plugin definition read from the class annotation. 1
Plugin::get public function Gets the value of an annotation. Overrides AnnotationInterface::get 5
Plugin::getClass public function Gets the class of the annotated class. Overrides AnnotationInterface::getClass
Plugin::getId public function Gets the unique ID for this annotated class. Overrides AnnotationInterface::getId
Plugin::getProvider public function Gets the name of the provider of the annotated class. Overrides AnnotationInterface::getProvider
Plugin::parse protected function Parses an annotation into its definition.
Plugin::setClass public function Sets the class of the annotated class. Overrides AnnotationInterface::setClass
Plugin::setProvider public function Sets the name of the provider of the annotated class. Overrides AnnotationInterface::setProvider
Plugin::__construct public function Constructs a Plugin object. 2
VoteResultFunction::$description public property A brief description of the voting result.
VoteResultFunction::$id public property The plugin ID.
VoteResultFunction::$label public property The human-readable name of the voting result.