public function PollStorage::getExpiredPolls in Poll 8
Returns all expired polls.
Return value
Overrides PollStorageInterface::getExpiredPolls
File
- src/
PollStorage.php, line 85
Class
- PollStorage
- Controller class for polls.
Namespace
Drupal\pollCode
public function getExpiredPolls() {
$query = $this->database
->query('SELECT id FROM {poll_field_data} WHERE (:timestamp > (created + runtime)) AND status = 1 AND runtime <> 0', [
':timestamp' => \Drupal::time()
->getCurrentTime(),
]);
return $this
->loadMultiple($query
->fetchCol());
}