public function Vote::query in Voting API 8.3
Return value
\Drupal\Core\Database\Query\SelectInterface
Overrides SqlBase::query
1 call to Vote::query()
- NodeVote::query in src/
Plugin/ migrate/ source/ d7/ NodeVote.php
1 method overrides Vote::query()
- NodeVote::query in src/
Plugin/ migrate/ source/ d7/ NodeVote.php
File
- src/
Plugin/ migrate/ source/ d7/ Vote.php, line 20
Class
- Vote
- Drupal 7 vote source from database.
Namespace
Drupal\votingapi\Plugin\migrate\source\d7Code
public function query() {
$query = $this
->select('votingapi_vote', 'v')
->fields('v');
foreach ([
'entity_type',
'value_type',
'tag',
] as $db_field_name) {
if (!empty($this->configuration[$db_field_name])) {
$value = (array) $this->configuration[$db_field_name];
$query
->condition("v.{$db_field_name}", $value, 'IN');
}
}
return $query;
}