You are here

protected function RateWidget::clickedButton in Rate 7.2

Check if the user has clicked a button on this widget and return that button.

Return value

mixed Instance of RateButton or FALSE.

1 call to RateWidget::clickedButton()
RateWidget::processVote in classes/widget.inc
Process the users vote (if applicable).

File

classes/widget.inc, line 291

Class

RateWidget

Code

protected function clickedButton() {
  foreach ($this->elements as $element) {
    if ($element instanceof RateButton && $element
      ->hasClicked()) {
      return $element;
    }
  }
  return FALSE;
}