Skip to content

digitizer - documentation for filter parameter and events #417

Description

@astroidex

Variables for the event

        $locals += array(
            'context' => $this->authorizationChecker,
            'tokenStorage' => $this->tokenStorage,
            'user' => $this->tokenStorage->getToken()->getUser(),
            'userRoles' => array(),
        );

https://github.com/mapbender/mapbender-digitizer/blob/develop/src/Mapbender/DataSourceBundle/Component/EventProcessor.php#L74

(wobei userRoles noch befüllt wird)

https://github.com/mapbender/mapbender-digitizer/blob/develop/src/Mapbender/DataSourceBundle/Component/EventAwareDataRepository.php#L109

Zusätzlich gibts noch die eventData, die für jedes Event anders ist. Z.B. fürs Save Event:

return array(
            'idKey' => $this->uniqueIdFieldName,
            'connection' => $this->connection,
            'item' => $item,
            'feature' => $item,
            'originData' => $originData,
        );

Bei den Filtern ist ":userName" die einzige Variable, die gesetzt wird und damit accessible ist im Filter
Zusätzlich gibt es auch "filterUser" und "trackUser" als eigenes Attribut zu geben

https://github.com/mapbender/mapbender-digitizer/blob/develop/src/Mapbender/DataSourceBundle/Component/DataRepository.php#L353

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Type

    No type

    Projects

    No projects

      Milestone

      No milestone

      Relationships

      None yet

      Development

      No branches or pull requests

      Issue actions