You are here

public function Context::getData in Price 2.0.x

Gets a data value with the given key.

Parameters

string $key: The key.

mixed $default: The default value.

Return value

mixed The value.

File

src/Context.php, line 85

Class

Context
Contains known global information (user, time).

Namespace

Drupal\price

Code

public function getData(string $key, $default = NULL) {
  return isset($this->data[$key]) ? $this->data[$key] : $default;
}