Changeset View
Changeset View
Standalone View
Standalone View
src/applications/passphrase/query/PassphraseCredentialQuery.php
Show First 20 Lines • Show All 51 Lines • ▼ Show 20 Lines | public function needSecrets($need_secrets) { | ||||
$this->needSecrets = $need_secrets; | $this->needSecrets = $need_secrets; | ||||
return $this; | return $this; | ||||
} | } | ||||
public function newResultObject() { | public function newResultObject() { | ||||
return new PassphraseCredential(); | return new PassphraseCredential(); | ||||
} | } | ||||
protected function loadPage() { | |||||
return $this->loadStandardPage($this->newResultObject()); | |||||
} | |||||
protected function willFilterPage(array $page) { | protected function willFilterPage(array $page) { | ||||
if ($this->needSecrets) { | if ($this->needSecrets) { | ||||
$secret_ids = mpull($page, 'getSecretID'); | $secret_ids = mpull($page, 'getSecretID'); | ||||
$secret_ids = array_filter($secret_ids); | $secret_ids = array_filter($secret_ids); | ||||
$secrets = array(); | $secrets = array(); | ||||
if ($secret_ids) { | if ($secret_ids) { | ||||
$secret_objects = id(new PassphraseSecret())->loadAllWhere( | $secret_objects = id(new PassphraseSecret())->loadAllWhere( | ||||
▲ Show 20 Lines • Show All 98 Lines • Show Last 20 Lines |