| @@ 60-66 (lines=7) @@ | ||
| 57 | * @throws \Exception |
|
| 58 | * Thrown when the text is not present in the list of parameters. |
|
| 59 | */ |
|
| 60 | public function getDrupalText($name) |
|
| 61 | { |
|
| 62 | $text = $this->getDrupalParameter('text'); |
|
| 63 | if (!isset($text[$name])) { |
|
| 64 | throw new \Exception(sprintf('No such Drupal string: %s', $name)); |
|
| 65 | } |
|
| 66 | return $text[$name]; |
|
| 67 | } |
|
| 68 | ||
| 69 | /** |
|
| @@ 81-87 (lines=7) @@ | ||
| 78 | * @throws \Exception |
|
| 79 | * Thrown when the selector is not present in the list of parameters. |
|
| 80 | */ |
|
| 81 | public function getDrupalSelector($name) |
|
| 82 | { |
|
| 83 | $text = $this->getDrupalParameter('selectors'); |
|
| 84 | if (!isset($text[$name])) { |
|
| 85 | throw new \Exception(sprintf('No such selector configured: %s', $name)); |
|
| 86 | } |
|
| 87 | return $text[$name]; |
|
| 88 | } |
|
| 89 | } |
|
| 90 | ||