Skip to content
  1. Extras
  2. YandexMapsLocator
  3. For developers

Events ​

EventWhen
OnYandexMapsLocatorRegisterFiltersBuilding the filter registry
OnYandexMapsLocatorRegisterFeatureProvidersRegistering Pro and third-party providers
OnYandexMapsLocatorBeforeStorePrepareBefore finalizing the Store DTO
OnYandexMapsLocatorAfterStorePrepareAfter building the Store DTO
OnYandexMapsLocatorBeforeSearchBefore the query (snippet and REST)
OnYandexMapsLocatorAfterSearchAfter loading the list
OnYandexMapsLocatorSerializeLocationBefore location fields in REST v1
OnYandexMapsLocatorBeforeApiResponseBefore REST JSON (version, action, payload)

Mutating Store ​

In a plugin, return the modified Store via $modx->event->output($store) or assign the object to store (by-ref in Before/After StorePrepare).

REST and BeforeSearch ​

OnYandexMapsLocatorBeforeSearch runs for both the snippet and REST. In REST, ApiSearchGuard runs once before search(). The event runs after the guard and sees criteria by-ref: a plugin can set where and product_id again. There is no second guard pass.

Package plugins ​

PackageEvents
FreeOnDocFormSave, OnSiteRefresh, OnDocFormRender (mgr geocoding)
ProRegisterFeatureProviders, RegisterFilters, BeforeStorePrepare (TZ, products, amenity, brand), AfterStorePrepare, SerializeLocation, OnDocFormRender (schedule preview)

Extension contract: Extension API.