1C-Bitrix 25.700.0
Загрузка...
Поиск...
Не найдено
conversionhandler.php
См. документацию.
1<?php
2namespace Bitrix\Seo;
3
4use Bitrix\Conversion\DayContext;
5use Bitrix\Main\Localization\Loc;
6use Bitrix\Seo\Adv\YandexBannerTable;
7
8Loc::loadMessages(__FILE__);
9
11{
13 {
15 {
16 $context->setAttribute('seo_yandex_direct_source', static::getSeoId());
17 }
18 }
19
20 protected static function getSeoId()
21 {
22 $session = AdvSession::getSession();
23
24 return $session['BANNER_ID'] ?? null;
25 }
26
27 public static function onGetAttributeTypes()
28 {
29 return array(
30 'seo_yandex_direct_source' => array(
31 'MODULE' => 'seo',
32 'GROUP' => 'source',
33 'SORT' => 5200, // must be before conversion_search_engine!
34 'NAME' => Loc::getMessage('SEO_CONVERSION_ATTRIBUTE_YANDEX_DIRECT_NAME'),
35 'BG_COLOR' => '#4bbedb',
36 'GET_VALUES' => function (array $ids)
37 {
38 $dbRes = YandexBannerTable::getList(array(
39 'filter' => array("=XML_ID" => $ids),
40 'select' => array("XML_ID", "NAME"),
41 'order' => array('NAME' => 'ASC'),
42 ));
43
44 $bannerList = array();
45 while($banner = $dbRes->fetch())
46 {
47 $bannerList[$banner['XML_ID']] = array("NAME" => $banner["NAME"]);
48 }
49
50 return $bannerList;
51 },
52 'SPLIT_BY' => 'seo_yandex_direct_source',
53 ),
54 );
55 }
56}
static isSession()
Определения advsession.php:56
static getSession()
Определения advsession.php:69
static onSetDayContextAttributes(DayContext $context)
Определения conversionhandler.php:12
static onGetAttributeTypes()
Определения conversionhandler.php:27
</td ></tr ></table ></td ></tr >< tr >< td class="bx-popup-label bx-width30"><?=GetMessage("PAGE_NEW_TAGS")?> array( $site)
Определения file_new.php:804
$context
Определения csv_new_setup.php:223
$dbRes
Определения yandex_detail.php:168