Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

digitizer - documentation for filter parameter and events #417

Open
astroidex opened this issue Dec 11, 2023 · 0 comments
Open

digitizer - documentation for filter parameter and events #417

astroidex opened this issue Dec 11, 2023 · 0 comments

Comments

@astroidex
Copy link
Member

astroidex commented Dec 11, 2023

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

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

1 participant