Hook Save on a page into admin


Does anybody could explaine me how to hook save into admin please ?
More exactly i need to hook the directory creation method. I’d like to create a special directory structure on page with some attributes.

Thanks for your help :-).


You could use the Grav API docs and look for an appropriate method, probably ‘createFolder’ and then find that function in the Grav source code.

Hello, i succeded hook with

public function onAdminSave(Event $event)

I could change for example path, but i permission denied error.

Any idea on how to surround this please ?