1C-Bitrix 25.700.0
Загрузка...
Поиск...
Не найдено
appform.php
См. документацию.
1<?php
2
4
5use Bitrix\Bitrix24\CurrentUser;
18
19class AppForm extends Controller
20{
21 public function showAction(string $config, \CRestServer $server = null): array
22 {
23 try
24 {
25 $transport = new PullTransport();
26 }
27 catch (\Exception $exception)
28 {
29 return [
30 'error' => 'NOT_INSTALLED_MODULE',
31 'error_description' => $exception->getMessage()
32 ];
33 }
34
35 $appForm = new \Bitrix\Rest\AppForm($config);
36
37 return ['success' => $appForm->sendShowMessage($transport)];
38 }
39
40 public function getConfigAction(string $clientId, string $type, array $formData = []): AjaxJson
41 {
42 try
43 {
44 $app = new \Bitrix\Rest\App($clientId);
45 $responseData = [
46 'config' => $app->fetchAppFormConfig($formData, EventType::from($type))
47 ];
48
49 return AjaxJson::createSuccess($responseData);
50 }
51 catch (ArgumentException $e)
52 {
53 $this->errorCollection->setError(new Error($e->getMessage()));
54 }
55 }
56
57 public function configureActions(): array
58 {
59 return [
60 'show' => [
61 '+prefilters' => [
63 ],
64 ],
65 ];
66 }
67}
$type
Определения options.php:106
Определения error.php:15
Определения event.php:5
Определения loader.php:13
Определения json.php:9
Определения app.php:68
getConfigAction(string $clientId, string $type, array $formData=[])
Определения appform.php:40
showAction(string $config, \CRestServer $server=null)
Определения appform.php:21
configureActions()
Определения appform.php:57
Определения rest.php:24
</td ></tr ></table ></td ></tr >< tr >< td class="bx-popup-label bx-width30"><?=GetMessage("PAGE_NEW_TAGS")?> array( $site)
Определения file_new.php:804
$app
Определения proxy.php:8
EventType
Определения EventType.php:6
$config
Определения quickway.php:69
$clientId
Определения seo_client.php:18