|
@@ 155-157 (lines=3) @@
|
| 152 |
|
} |
| 153 |
|
|
| 154 |
|
// Check confirmer |
| 155 |
|
if ((!$confirmer = $this->getComponent('confirmer-' . $name)) || !$confirmer instanceof Confirmer || $confirmer->isConfigured()) { |
| 156 |
|
throw new Exceptions\InvalidArgumentException("Confirmation control '$name' could not be created."); |
| 157 |
|
} |
| 158 |
|
|
| 159 |
|
// Set confirmer handler |
| 160 |
|
$confirmer->setHandler($handler); |
|
@@ 176-178 (lines=3) @@
|
| 173 |
|
*/ |
| 174 |
|
public function getConfirmer(string $name) : Confirmer |
| 175 |
|
{ |
| 176 |
|
if ((!$confirmer = $this->getComponent('confirmer-' . $name)) || !$confirmer instanceof Confirmer || !$confirmer->isConfigured()) { |
| 177 |
|
throw new Exceptions\InvalidArgumentException("Confirmation control '$name' does not exists."); |
| 178 |
|
} |
| 179 |
|
|
| 180 |
|
return $confirmer; |
| 181 |
|
} |