| 1: | <?php |
| 2: | |
| 3: | declare(strict_types=1); |
| 4: | |
| 5: | namespace Atk4\Ui\UserAction; |
| 6: | |
| 7: | use Atk4\Core\WarnDynamicPropertyTrait; |
| 8: | use Atk4\Ui\AbstractView; |
| 9: | use Atk4\Ui\Js\JsBlock; |
| 10: | |
| 11: | class SharedExecutor |
| 12: | { |
| 13: | use WarnDynamicPropertyTrait; |
| 14: | |
| 15: | |
| 16: | private ExecutorInterface $executor; |
| 17: | |
| 18: | |
| 19: | |
| 20: | |
| 21: | public function __construct(ExecutorInterface $executor) |
| 22: | { |
| 23: | $this->executor = $executor; |
| 24: | } |
| 25: | |
| 26: | |
| 27: | |
| 28: | |
| 29: | public function getExecutor(): ExecutorInterface |
| 30: | { |
| 31: | return $this->executor; |
| 32: | } |
| 33: | |
| 34: | |
| 35: | |
| 36: | |
| 37: | public function jsExecute(array $urlArgs): JsBlock |
| 38: | { |
| 39: | |
| 40: | |
| 41: | return $this->getExecutor()->jsExecute($urlArgs); |
| 42: | } |
| 43: | } |
| 44: | |