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
- class \Drupal\Component\Annotation\Plugin implements AnnotationInterface
- class \Drupal\votingapi\Annotation\VoteResultFunction
Expanded class hierarchy of VoteResultFunction
See also
\Drupal\votingapi\VoteResultFunctionInterface
\Drupal\votingapi\VoteResultFunctionBase
\Drupal\votingapi\VoteResultFunctionManager
1 file declares its use of VoteResultFunction
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\AnnotationView 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
Name | Modifiers | Type | Description | Overrides |
---|---|---|---|---|
Plugin:: |
protected | property | The plugin definition read from the class annotation. | 1 |
Plugin:: |
public | function |
Gets the value of an annotation. Overrides AnnotationInterface:: |
5 |
Plugin:: |
public | function |
Gets the class of the annotated class. Overrides AnnotationInterface:: |
|
Plugin:: |
public | function |
Gets the unique ID for this annotated class. Overrides AnnotationInterface:: |
|
Plugin:: |
public | function |
Gets the name of the provider of the annotated class. Overrides AnnotationInterface:: |
|
Plugin:: |
protected | function | Parses an annotation into its definition. | |
Plugin:: |
public | function |
Sets the class of the annotated class. Overrides AnnotationInterface:: |
|
Plugin:: |
public | function |
Sets the name of the provider of the annotated class. Overrides AnnotationInterface:: |
|
Plugin:: |
public | function | Constructs a Plugin object. | 2 |
VoteResultFunction:: |
public | property | A brief description of the voting result. | |
VoteResultFunction:: |
public | property | The plugin ID. | |
VoteResultFunction:: |
public | property | The human-readable name of the voting result. |