Bitrix-D7 23.9
 
Загрузка...
Поиск...
Не найдено
config.php
1<?php
2
4
5
10
11abstract class Config extends AbstractBase
12{
21 public function set(Configuration\IConfig $config) : ?Retargeting\Response
22 {
23 if (
24 $config instanceof Facebook\Config &&
25 ($setup = Facebook\Setup::load()) &&
26 ($managerId = Facebook\Installs::load()->getBusinessManager())
27 )
28 {
29 return $this->getRequest()->send([
30 'methodName' => $this->getMethodName('config.change'),
31 'parameters' => [
32 'fbe_external_business_id' => $setup->get(Facebook\Setup::BUSINESS_ID) ,
33 'business_config' => $config->toArray(),
34 'business_id' => $managerId
35 ]]);
36 }
37 return null;
38 }
39
45 public function get() : ?Retargeting\Response
46 {
47 if($setup = Facebook\Setup::load())
48 {
49 return $this->getRequest()->send([
50 'methodName' => $this->getMethodName('config.get'),
51 'parameters' => [
52 'fbe_external_business_id' => $setup->get(Facebook\Setup::BUSINESS_ID)
53 ]]);
54 }
55 return null;
56 }
57}