Differential D14702 Diff 35572 src/applications/transactions/query/PhabricatorEditEngineConfigurationQuery.php
Changeset View
Changeset View
Standalone View
Standalone View
src/applications/transactions/query/PhabricatorEditEngineConfigurationQuery.php
| <?php | <?php | ||||
| final class PhabricatorEditEngineConfigurationQuery | final class PhabricatorEditEngineConfigurationQuery | ||||
| extends PhabricatorCursorPagedPolicyAwareQuery { | extends PhabricatorCursorPagedPolicyAwareQuery { | ||||
| private $ids; | private $ids; | ||||
| private $phids; | private $phids; | ||||
| private $engineKeys; | private $engineKeys; | ||||
| private $builtinKeys; | private $builtinKeys; | ||||
| private $identifiers; | private $identifiers; | ||||
| private $default; | private $default; | ||||
| private $isEdit; | |||||
| private $disabled; | private $disabled; | ||||
| private $ignoreDatabaseConfigurations; | private $ignoreDatabaseConfigurations; | ||||
| public function withIDs(array $ids) { | public function withIDs(array $ids) { | ||||
| $this->ids = $ids; | $this->ids = $ids; | ||||
| return $this; | return $this; | ||||
| } | } | ||||
| Show All 17 Lines | public function withIdentifiers(array $identifiers) { | ||||
| return $this; | return $this; | ||||
| } | } | ||||
| public function withIsDefault($default) { | public function withIsDefault($default) { | ||||
| $this->default = $default; | $this->default = $default; | ||||
| return $this; | return $this; | ||||
| } | } | ||||
| public function withIsEdit($edit) { | |||||
| $this->isEdit = $edit; | |||||
| return $this; | |||||
| } | |||||
| public function withIsDisabled($disabled) { | public function withIsDisabled($disabled) { | ||||
| $this->disabled = $disabled; | $this->disabled = $disabled; | ||||
| return $this; | return $this; | ||||
| } | } | ||||
| public function withIgnoreDatabaseConfigurations($ignore) { | public function withIgnoreDatabaseConfigurations($ignore) { | ||||
| $this->ignoreDatabaseConfigurations = $ignore; | $this->ignoreDatabaseConfigurations = $ignore; | ||||
| return $this; | return $this; | ||||
| ▲ Show 20 Lines • Show All 90 Lines • ▼ Show 20 Lines | protected function loadPage() { | ||||
| if ($this->default !== null) { | if ($this->default !== null) { | ||||
| foreach ($page as $key => $config) { | foreach ($page as $key => $config) { | ||||
| if ($config->getIsDefault() != $this->default) { | if ($config->getIsDefault() != $this->default) { | ||||
| unset($page[$key]); | unset($page[$key]); | ||||
| } | } | ||||
| } | } | ||||
| } | } | ||||
| if ($this->isEdit !== null) { | |||||
| foreach ($page as $key => $config) { | |||||
| if ($config->getIsEdit() != $this->isEdit) { | |||||
| unset($page[$key]); | |||||
| } | |||||
| } | |||||
| } | |||||
| if ($this->disabled !== null) { | if ($this->disabled !== null) { | ||||
| foreach ($page as $key => $config) { | foreach ($page as $key => $config) { | ||||
| if ($config->getIsDisabled() != $this->disabled) { | if ($config->getIsDisabled() != $this->disabled) { | ||||
| unset($page[$key]); | unset($page[$key]); | ||||
| } | } | ||||
| } | } | ||||
| } | } | ||||
| ▲ Show 20 Lines • Show All 88 Lines • Show Last 20 Lines | |||||