Changeset View
Changeset View
Standalone View
Standalone View
src/applications/nuance/query/NuanceSourceQuery.php
Show First 20 Lines • Show All 42 Lines • ▼ Show 20 Lines | final class NuanceSourceQuery | ||||
public function newResultObject() { | public function newResultObject() { | ||||
return new NuanceSource(); | return new NuanceSource(); | ||||
} | } | ||||
protected function getPrimaryTableAlias() { | protected function getPrimaryTableAlias() { | ||||
return 'source'; | return 'source'; | ||||
} | } | ||||
protected function loadPage() { | |||||
return $this->loadStandardPage($this->newResultObject()); | |||||
} | |||||
protected function willFilterPage(array $sources) { | protected function willFilterPage(array $sources) { | ||||
$all_types = NuanceSourceDefinition::getAllDefinitions(); | $all_types = NuanceSourceDefinition::getAllDefinitions(); | ||||
foreach ($sources as $key => $source) { | foreach ($sources as $key => $source) { | ||||
$definition = idx($all_types, $source->getType()); | $definition = idx($all_types, $source->getType()); | ||||
if (!$definition) { | if (!$definition) { | ||||
$this->didRejectResult($source); | $this->didRejectResult($source); | ||||
unset($sources[$key]); | unset($sources[$key]); | ||||
▲ Show 20 Lines • Show All 75 Lines • Show Last 20 Lines |