You are here

public function UsefulWidget::getInitialVotingElement in Votingapi Widgets 8

Get initial element.

Overrides VotingApiWidgetBase::getInitialVotingElement

File

src/Plugin/votingapi_widget/UsefulWidget.php, line 53

Class

UsefulWidget
Assigns ownership of a node to a user.

Namespace

Drupal\votingapi_widgets\Plugin\votingapi_widget

Code

public function getInitialVotingElement(array &$form) {
  $form['value']['#prefix'] = '<div class="votingapi-widgets useful">';
  $form['value']['#attached'] = [
    'library' => [
      'votingapi_widgets/useful',
    ],
  ];
  $form['value']['#suffix'] = '</div>';
}