mirror of
https://github.com/silverstripe/silverstripe-framework
synced 2024-10-03 22:58:24 +02:00
Merge pull request #1254 from ryanwachtl/patch-2
Update execution-pipeline.md
This commit is contained in:
commit
693a92f9c9
@ -61,7 +61,7 @@ When you create a function, you can access the ID like this:
|
|||||||
|
|
||||||
:::php
|
:::php
|
||||||
public function addToCart ($request) {
|
public function addToCart ($request) {
|
||||||
$param = $r->allParams();
|
$param = $request->allParams();
|
||||||
echo "my ID = " . $param["ID"];
|
echo "my ID = " . $param["ID"];
|
||||||
$obj = MyProduct::get()->byID($param["ID"]);
|
$obj = MyProduct::get()->byID($param["ID"]);
|
||||||
$obj->addNow();
|
$obj->addNow();
|
||||||
@ -79,10 +79,13 @@ You can access the following controller-method with /team/signup
|
|||||||
class Team extends DataObject {}
|
class Team extends DataObject {}
|
||||||
|
|
||||||
class Team_Controller extends Controller {
|
class Team_Controller extends Controller {
|
||||||
|
|
||||||
static $allowed_actions = array('signup');
|
static $allowed_actions = array('signup');
|
||||||
|
|
||||||
public function signup($id, $otherId) {
|
public function signup($id, $otherId) {
|
||||||
return $this->renderWith('MyTemplate');
|
return $this->renderWith('MyTemplate');
|
||||||
}
|
}
|
||||||
|
|
||||||
}
|
}
|
||||||
|
|
||||||
## SSViewer template rendering
|
## SSViewer template rendering
|
||||||
|
Loading…
Reference in New Issue
Block a user