| 1: | <?php |
| 2: | |
| 3: | declare(strict_types=1); |
| 4: | |
| 5: | namespace Atk4\Ui\Js; |
| 6: | |
| 7: | use Atk4\Core\WarnDynamicPropertyTrait; |
| 8: | |
| 9: | |
| 10: | |
| 11: | |
| 12: | class JsVueService |
| 13: | { |
| 14: | use WarnDynamicPropertyTrait; |
| 15: | |
| 16: | public function createServiceChain(): JsChain |
| 17: | { |
| 18: | return new JsChain('atk.vueService'); |
| 19: | } |
| 20: | |
| 21: | |
| 22: | |
| 23: | |
| 24: | |
| 25: | |
| 26: | public function createAtkVue(string $id, string $componentName, array $data = []): JsChain |
| 27: | { |
| 28: | return $this->createServiceChain()->createAtkVue($id, $componentName, $data); |
| 29: | } |
| 30: | |
| 31: | |
| 32: | |
| 33: | |
| 34: | |
| 35: | |
| 36: | |
| 37: | public function createVue(string $id, string $componentName, JsExpressionable $component, array $data = []): JsChain |
| 38: | { |
| 39: | return $this->createServiceChain()->createVue($id, $componentName, $component, $data); |
| 40: | } |
| 41: | } |
| 42: | |