Bitrix-D7 23.9
 
Загрузка...
Поиск...
Не найдено
Класс Map

Открытые статические члены

static prepareManifest (array $manifest, Block $block=null, array $params=[])
 

Защищенные статические члены

static isMapBlock (Block $block)
 
static readSettings (array $hooks)
 
static readProviderFromBlock (Block $block)
 
static canUseYandex ()
 
static getDefaultMapCenter ()
 
static addRequiredUserAction (array $manifest)
 
static addNodes (array $manifest)
 
static addSettings (array $manifest)
 
static addVisualSettings (array $manifest)
 
static addAssets (array $manifest)
 

Защищенные данные

const PROVIDER_GOOGLE = 'google'
 
const PROVIDER_YANDEX = 'yandex'
 
const PROVIDER_DEFAULT = Map::PROVIDER_GOOGLE
 
const PROVIDER_REGEXP = '/data-map-provider=[\'"]([\w-]+)[\'"]/i'
 
const MAP_SELECTOR = '.landing-block-node-map'
 
const ASSET_NAME = 'map_init'
 

Статические защищенные данные

static $settings = []
 
static $provider = Map::PROVIDER_DEFAULT
 
static $manifestStore = []
 

Подробное описание

Subtype for blocks with map

См. определение в файле map.php строка 17

Методы

◆ addAssets()

static addAssets ( array $manifest)
staticprotected

Load extensions

Аргументы
array$manifest
Возвращает
array

См. определение в файле map.php строка 456

◆ addNodes()

static addNodes ( array $manifest)
staticprotected

См. определение в файле map.php строка 291

◆ addRequiredUserAction()

static addRequiredUserAction ( array $manifest)
staticprotected

Set alert actions if needed

Аргументы
array$manifest
Возвращает
array

См. определение в файле map.php строка 249

◆ addSettings()

static addSettings ( array $manifest)
staticprotected

Add settings for map

Аргументы
array$manifest
Возвращает
array

См. определение в файле map.php строка 310

◆ addVisualSettings()

static addVisualSettings ( array $manifest)
staticprotected

Add some design settings for map.

Аргументы
array$manifest
Возвращает
array

См. определение в файле map.php строка 352

◆ canUseYandex()

static canUseYandex ( )
staticprotected

См. определение в файле map.php строка 215

◆ getDefaultMapCenter()

static getDefaultMapCenter ( )
staticprotected

См. определение в файле map.php строка 220

◆ isMapBlock()

static isMapBlock ( Block $block)
staticprotected

Check if block has map node

Аргументы
Block$block
Возвращает
bool

См. определение в файле map.php строка 161

◆ prepareManifest()

static prepareManifest ( array $manifest,
Block $block = null,
array $params = [] )
static

Prepare manifest.

Аргументы
array$manifestBlock's manifest.
Block | null$blockBlock instance.
array$paramsAdditional params.
Возвращает
array

См. определение в файле map.php строка 62

◆ readProviderFromBlock()

static readProviderFromBlock ( Block $block)
staticprotected

Try to find data-attribute with provider name and save them in static var. Save default if not found.

Аргументы
Block$block
Возвращает
void

См. определение в файле map.php строка 196

◆ readSettings()

static readSettings ( array $hooks)
staticprotected
Аргументы
Hook\Page[]$hooks- array of page setting hooks
Возвращает
void

См. определение в файле map.php строка 170

Данные класса

◆ $manifestStore

$manifestStore = []
staticprotected

См. определение в файле map.php строка 53

◆ $provider

$provider = Map::PROVIDER_DEFAULT
staticprotected

См. определение в файле map.php строка 41

◆ $settings

$settings = []
staticprotected

См. определение в файле map.php строка 35

◆ ASSET_NAME

const ASSET_NAME = 'map_init'
protected

Asset for default provider. For other - must be replaced 'google'

См. определение в файле map.php строка 51

◆ MAP_SELECTOR

const MAP_SELECTOR = '.landing-block-node-map'
protected

Default selector for map node

См. определение в файле map.php строка 46

◆ PROVIDER_DEFAULT

const PROVIDER_DEFAULT = Map::PROVIDER_GOOGLE
protected

См. определение в файле map.php строка 24

◆ PROVIDER_GOOGLE

const PROVIDER_GOOGLE = 'google'
protected

Map provider names

См. определение в файле map.php строка 22

◆ PROVIDER_REGEXP

const PROVIDER_REGEXP = '/data-map-provider=[\'"]([\w-]+)[\'"]/i'
protected

Regexp for find data-attribute with provider name. If not find - set default

См. определение в файле map.php строка 29

◆ PROVIDER_YANDEX

const PROVIDER_YANDEX = 'yandex'
protected

См. определение в файле map.php строка 23