public function DomainSource::getValueOptions in Domain Access 8
Child classes should be used to override this function and set the 'value options', unless 'options callback' is defined as a valid function or static public method to generate these values.
This can use a guard to be used to reduce database hits as much as possible.
Return value
array|null The stored values from $this->valueOptions.
Overrides InOperator::getValueOptions
File
- domain_source/
src/ Plugin/ views/ filter/ DomainSource.php, line 19
Class
- DomainSource
- Filter by published status.
Namespace
Drupal\domain_source\Plugin\views\filterCode
public function getValueOptions() {
if (!isset($this->valueOptions)) {
$this->valueTitle = $this
->t('Domains');
$this->valueOptions = [
'_active' => $this
->t('Active domain'),
] + \Drupal::entityTypeManager()
->getStorage('domain')
->loadOptionsList();
}
return $this->valueOptions;
}