You are here

public function Redirect::getRedirectOption in Redirect 8

Gets a specific redirect URL option.

Parameters

string $key: Option key.

mixed $default: Default value used in case option does not exist.

Return value

mixed The option value.

File

src/Entity/Redirect.php, line 245

Class

Redirect
The redirect entity class.

Namespace

Drupal\redirect\Entity

Code

public function getRedirectOption($key, $default = NULL) {
  $options = $this
    ->getRedirectOptions();
  return isset($options[$key]) ? $options[$key] : $default;
}