public function Fivestar::getInfo in Fivestar 8
Returns the element properties for this element.
Return value
array An array of element properties. See \Drupal\Core\Render\ElementInfoManagerInterface::getInfo() for documentation of the standard properties of all elements, and the return value format.
Overrides ElementInterface::getInfo
File
- src/
Element/ Fivestar.php, line 19
Class
- Fivestar
- Provides a fivestar form element.
Namespace
Drupal\fivestar\ElementCode
public function getInfo() {
$class = get_class($this);
return [
'#input' => TRUE,
'#stars' => 5,
'#allow_clear' => FALSE,
'#allow_revote' => FALSE,
'#allow_ownvote' => FALSE,
'#ajax' => NULL,
'#show_static_result' => FALSE,
'#process' => [
[
$class,
'process',
],
[
$class,
'processAjaxForm',
],
],
'#theme_wrappers' => [
'form_element',
],
'#widget' => [
'name' => 'default',
],
'#values' => [
'vote_user' => 0,
'vote_average' => 0,
'vote_count' => 0,
],
'#settings' => [
'display_format' => 'average',
'text_format' => 'none',
],
];
}