Skip to content

HTTPS clone URL

Subversion checkout URL

You can clone with HTTPS or Subversion.

Download ZIP
Browse files

Updated action signatures to use underscores instead of camelCase

Change should remove any ambiguities new developers have when attempting to figure out action signatures
  • Loading branch information...
commit 3d1195e2d48caece35aabdd970382e48235b7ad3 1 parent 93bb9cf
@josegonzalez josegonzalez authored
View
2  en/controllers.rst
@@ -332,7 +332,7 @@ Flow Control
you might wish to redirect them to a receipt screen.::
<?php
- public function placeOrder() {
+ public function place_order() {
// Logic for finalizing order goes here
if ($success) {
$this->redirect(array('controller' => 'orders', 'action' => 'thanks'));
View
4 en/core-libraries/components/access-control-lists.rst
@@ -522,7 +522,7 @@ models to save data like we always do:
::
<?php
- function anyAction() {
+ function any_action() {
$aro =& $this->Acl->Aro;
// Here's all of our group info in an array we can iterate through
@@ -587,7 +587,7 @@ specific model records in our database.
::
<?php
- function anyAction() {
+ function any_action() {
$aro = new Aro();
// Here are our user records, ready to be linked up to new ARO records
View
2  en/models.rst
@@ -104,7 +104,7 @@ model::
<?php
class Recipe extends AppModel {
- public function steakRecipes() {
+ public function steak_recipes() {
$ingredient = $this->Ingredient->findByName('Steak');
return $this->findAllByMainIngredient($ingredient['Ingredient']['id']);
}
View
4 en/models/associations-linking-models-together.rst
@@ -841,7 +841,7 @@ purposes, let's use unbindModel() to remove that association in a
controller action::
<?php
- public function someAction() {
+ public function some_action() {
// This fetches Leaders, and their associated Followers
$this->Leader->find('all');
@@ -888,9 +888,9 @@ following find operation). This function appears in the
LeadersController::
<?php
- public function anotherAction() {
// There is no Leader hasMany Principles in
// the leader.php model file, so a find here,
+ public function another_action() {
// only fetches Leaders.
$this->Leader->find('all');
View
8 en/views.rst
@@ -306,7 +306,7 @@ controller, setting the ``$title_for_layout`` variable::
<?php
class UsersController extends AppController {
- public function viewActive() {
+ public function view_active() {
$this->set('title_for_layout', 'View Active Users');
}
}
@@ -338,12 +338,12 @@ using something like::
<?php
class UsersController extends AppController {
- public function viewActive() {
+ public function view_active() {
$this->set('title_for_layout', 'View Active Users');
$this->layout = 'default_small_ad';
}
- public function viewImage() {
+ public function view_image() {
$this->layout = 'image';
//output user image
}
@@ -370,7 +370,7 @@ Contacts plugin::
<?php
class UsersController extends AppController {
- public function viewActive() {
+ public function view_active() {
$this->layout = 'Contacts.contact';
}
}
View
2  pt/controllers.rst
@@ -286,7 +286,7 @@ Controle de Fluxo
de recepção.::
<?php
- function placeOrder() {
+ function place_order() {
// Logic for finalizing order goes here
if ($success) {
$this->redirect(array('controller' => 'orders', 'action' => 'thanks'));
View
2  ru/models.rst
@@ -99,7 +99,7 @@ CakePHP автоматически сделает модель доступно
<?php
class Recipe extends AppModel {
- function steakRecipes() {
+ function steak_recipes() {
$ingredient = $this->Ingredient->findByName('Steak');
return $this->findAllByMainIngredient($ingredient['Ingredient']['id']);
}
View
6 ru/views.rst
@@ -111,7 +111,7 @@
<?php
class UsersController extends AppController {
- function viewActive() {
+ function view_active() {
$this->set('title_for_layout', 'View Active Users');
}
}
@@ -144,12 +144,12 @@
<?php
class UsersController extends AppController {
- public function viewActive() {
+ public function view_active() {
$this->set('title_for_layout', 'View Active Users');
$this->layout = 'default_small_ad';
}
- public function viewImage() {
+ public function view_image() {
$this->layout = 'image';
//вывод изображения пользователя
}
Please sign in to comment.
Something went wrong with that request. Please try again.