Created
November 25, 2016 15:23
-
-
Save anonymous/eaeef9d173c2e3d0b20a48f92ea91ed6 to your computer and use it in GitHub Desktop.
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
##### http://localhost/something/test -> Error 400 "There seems to have been a technical problem. Please click the back button, refresh your browser, and try again." | |
##### route.yml | |
Director: | |
rules: | |
'something': 'ObjectName_Controller' | |
##### DataObject and Controller | |
class ObjectName extends DataObject { | |
} | |
class ObjectName_Controller extends ContentController { | |
private static $url_handlers = array( | |
'test' => 'test', | |
); | |
protected static $allowed_actions = array( | |
'test', | |
); | |
public function test() { | |
echo "HERE"; | |
return Form::create($this, __FUNCTION__, new FieldList(), new FieldList()); | |
} | |
} |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment