You are here

public function SiteMapHelper::setOption in Site map 8

Sets options based on admin input paramaters for redering.

Parameters

array $options: The array of options to the site map theme.

string $option_string: The string index given from the admin form to match.

int $equal_param: Result of param test, 0 or 1.

string $set_string: Index of option to set, or the option name.

bool $set_value: The option, on or off, or strings or ints for other options.

2 calls to SiteMapHelper::setOption()
SiteMapHelper::getTaxonomyTree in src/SiteMapHelper.php
Render the taxonomy tree.
SiteMapHelper::getTerms in src/SiteMapHelper.php
Render the latest maps for the taxonomy tree.

File

src/SiteMapHelper.php, line 45

Class

SiteMapHelper
Defines a helper class for stuff related to views data.

Namespace

Drupal\site_map

Code

public function setOption(array &$options, $option_string, $equal_param, $set_string, $set_value) {
  $config = $this->configFactory
    ->get('site_map.settings');
  if ($config
    ->get($option_string) == $equal_param) {
    $options[$set_string] = $set_value;
  }
}