1C-Bitrix 25.700.0
Загрузка...
Поиск...
Не найдено
accountvkads.php
См. документацию.
1<?
2
3namespace Bitrix\Seo\Retargeting\Services;
4
5use Bitrix\Main\Context;
6use Bitrix\Main\Web\Json;
7use Bitrix\Main\Web\Uri;
8use \Bitrix\Seo\Retargeting\Account;
9use Bitrix\Main\Result;
10use Bitrix\Main\Type\Date;
11
12class AccountVkads extends Account
13{
14 const TYPE_CODE = 'vkads';
15
16 protected static $listRowMap = array(
17 'ID' => 'ACCOUNT_ID',
18 'NAME' => 'NAME',
19 );
20
21 public function getList()
22 {
23 $response = $this->getRequest()->send(array(
24 'methodName' => 'retargeting.account.list',
25 'parameters' => array()
26 ));
27 $data = $response->getData();
28 $data = array_values(array_filter($data, function ($item) {
29 return ($item['account_type'] == 'general'); // only "general" is supported
30 }));
31 $response->setData($data);
32 return $response;
33 }
34
35 public function getProfile()
36 {
37 $response = $this->getRequest()->send(array(
38 'methodName' => 'analytics.profile',
39 'parameters' => []
40 ));
41
42 if (
43 $response->isSuccess()
44 && ($data = $response->fetch())
45 )
46 {
47 $result = [
48 'ID' => $data['ID'],
49 'NAME' => $data['FIRST_NAME'] . ' ' . $data['LAST_NAME'],
50 'LINK' => 'https://ads.vk.com/hq/budget/transactions/',
51 ];
52
53 $result['PICTURE'] = (Context::getCurrent()->getRequest()->isHttps() ? 'https' : 'http')
54 . '://'
55 . Context::getCurrent()->getServer()->getHttpHost() . '/bitrix/images/seo/integration/vklogo.svg';
56
57 return $result;
58 }
59
60 return null;
61 }
62}
$data['IS_AVAILABLE']
Определения .description.php:13
</td ></tr ></table ></td ></tr >< tr >< td class="bx-popup-label bx-width30"><?=GetMessage("PAGE_NEW_TAGS")?> array( $site)
Определения file_new.php:804
$result
Определения get_property_values.php:14
$response
Определения result.php:21