Skip to content

Commit

Permalink
Revert changes to edit() and view() function signatures. (CFM-205)
Browse files Browse the repository at this point in the history
  • Loading branch information
arlen committed Feb 22, 2023
1 parent d26ca77 commit 6b54833
Showing 1 changed file with 4 additions and 13 deletions.
17 changes: 4 additions & 13 deletions app/src/Controller/StandardController.php
Original file line number Diff line number Diff line change
Expand Up @@ -257,7 +257,7 @@ public function delete($id) {
* @param string $id Object ID
*/

public function edit(string $id, bool $standardRender = true) {
public function edit(string $id) {
// $this->name = Models (ie: from ModelsTable)
$modelsName = $this->name;
// $table = the actual table object
Expand Down Expand Up @@ -366,12 +366,7 @@ public function edit(string $id, bool $standardRender = true) {
}

// Let the view render
if($standardRender) {
// $standardRender can be set to false to allow CakePHP
// to do it's normal controller::action->view::action.php mapping
$this->render('/Standard/add-edit-view');
}

$this->render('/Standard/add-edit-view');
}

/**
Expand Down Expand Up @@ -707,7 +702,7 @@ protected function populateAutoViewVars(object $obj=null) {
* @param Integer $id Object ID
*/

public function view($id = null, bool $standardRender = true) {
public function view($id = null) {
// $this->name = Models
$modelsName = $this->name;
// $table = the actual table object
Expand Down Expand Up @@ -764,10 +759,6 @@ public function view($id = null, bool $standardRender = true) {
}

// Let the view render
if($standardRender) {
// $standardRender can be set to false to allow CakePHP
// to do it's normal controller::action->view::action.php mapping
$this->render('/Standard/add-edit-view');
}
$this->render('/Standard/add-edit-view');
}
}

0 comments on commit 6b54833

Please sign in to comment.