Permalink
Browse files

MINOR: Added explicit 'public' keyword on functions.

  • Loading branch information...
sminnee committed Mar 9, 2012
1 parent ba93028 commit 3d54668896dab25dccfc54dfbd0b56030a2be9dc
Showing with 90 additions and 90 deletions.
  1. +11 −11 forms/FieldList.php
  2. +79 −79 forms/Form.php
View
@@ -219,7 +219,7 @@ public function replaceField($fieldName, $newField) {
* @param string $newFieldTitle New title of field
* @return boolean
*/
- function renameField($fieldName, $newFieldTitle) {
+ public function renameField($fieldName, $newFieldTitle) {
$field = $this->dataFieldByName($fieldName);
if(!$field) return false;
@@ -424,7 +424,7 @@ public function setValues($data) {
*
* @return FieldList
*/
- function HiddenFields() {
+ public function HiddenFields() {
$hiddenFields = new FieldList();
$dataFields = $this->dataFields();
@@ -439,7 +439,7 @@ function HiddenFields() {
* Return all fields except for the hidden fields.
* Useful when making your own simplified form layouts.
*/
- function VisibleFields() {
+ public function VisibleFields() {
$visibleFields = new FieldList();
foreach($this as $field) {
@@ -455,7 +455,7 @@ function VisibleFields() {
*
* @return FieldList
*/
- function transform($trans) {
+ public function transform($trans) {
$this->flushFieldsCache();
$newFields = new FieldList();
foreach($this as $field) {
@@ -467,12 +467,12 @@ function transform($trans) {
/**
* Returns the root field set that this belongs to
*/
- function rootFieldSet() {
+ public function rootFieldSet() {
if($this->containerField) return $this->containerField->rootFieldSet();
else return $this;
}
- function setContainerField($field) {
+ public function setContainerField($field) {
$this->containerField = $field;
return $this;
}
@@ -482,7 +482,7 @@ function setContainerField($field) {
*
* @return FieldList
*/
- function makeReadonly() {
+ public function makeReadonly() {
return $this->transform(new ReadonlyTransformation());
}
@@ -491,7 +491,7 @@ function makeReadonly() {
*
* @param string|FormField
*/
- function makeFieldReadonly($field) {
+ public function makeFieldReadonly($field) {
$fieldName = ($field instanceof FormField) ? $field->getName() : $field;
$srcField = $this->dataFieldByName($fieldName);
$this->replaceField($fieldName, $srcField->performReadonlyTransformation());
@@ -506,7 +506,7 @@ function makeFieldReadonly($field) {
*
* @param array $fieldNames Field names can be given as an array, or just as a list of arguments.
*/
- function changeFieldOrder($fieldNames) {
+ public function changeFieldOrder($fieldNames) {
// Field names can be given as an array, or just as a list of arguments.
if(!is_array($fieldNames)) $fieldNames = func_get_args();
@@ -541,7 +541,7 @@ function changeFieldOrder($fieldNames) {
* @param string|FormField
* @return Position in children collection (first position starts with 0). Returns FALSE if the field can't be found.
*/
- function fieldPosition($field) {
+ public function fieldPosition($field) {
if(is_object($field)) $field = $field->getName();
$i = 0;
@@ -563,7 +563,7 @@ function fieldPosition($field) {
* @subpackage fields-structural
*/
class HiddenFieldList extends FieldList {
- function forTemplate() {
+ public function forTemplate() {
$output = "";
foreach($this as $field) {
$output .= $field->Field();
Oops, something went wrong.

0 comments on commit 3d54668

Please sign in to comment.