Search code examples
neoscms

How to get NodeType information from a controller


How could I get NodeType information from within a controller? E.g., for checking access rights?


Solution

  • I'm not sure if that's what you are asking for:

    You can get access of a nodes property within a controller (e.g. for an extension) like this:

    $myOwnProperty = $this->request->getInternalArgument('__myOwnProperty');

    "myOwnProperty" has to be defined for a nodetype in Configuration\Settings.yaml

    The internal argument gets two underscores before the property name.