From 910f77b049d08f96ad4a000b36a8d7f0e3b6cfca Mon Sep 17 00:00:00 2001 From: Zauberfisch Date: Wed, 24 Apr 2013 07:28:47 +0100 Subject: [PATCH] MINOR: return on all setters (fixes #16) --- code/GridFieldAddExistingSearchButton.php | 6 ++++++ code/GridFieldAddNewInlineButton.php | 4 ++++ code/GridFieldAddNewMultiClass.php | 6 ++++++ code/GridFieldOrderableRows.php | 2 ++ 4 files changed, 18 insertions(+) mode change 100644 => 100755 code/GridFieldAddExistingSearchButton.php mode change 100644 => 100755 code/GridFieldAddNewInlineButton.php mode change 100644 => 100755 code/GridFieldAddNewMultiClass.php mode change 100644 => 100755 code/GridFieldOrderableRows.php diff --git a/code/GridFieldAddExistingSearchButton.php b/code/GridFieldAddExistingSearchButton.php old mode 100644 new mode 100755 index 0ca45c7..57300e7 --- a/code/GridFieldAddExistingSearchButton.php +++ b/code/GridFieldAddExistingSearchButton.php @@ -28,9 +28,11 @@ class GridFieldAddExistingSearchButton implements /** * @param string $title + * @return GridFieldAddExistingSearchButton $this */ public function setTitle($title) { $this->title = $title; + return $this; } /** @@ -42,18 +44,22 @@ class GridFieldAddExistingSearchButton implements /** * @param string $fragment + * @return GridFieldAddExistingSearchButton $this */ public function setFragment($fragment) { $this->fragment = $fragment; + return $this; } /** * Sets a custom list to use to provide the searchable items. * * @param SS_List $list + * @return GridFieldAddExistingSearchButton $this */ public function setSearchList(SS_List $list) { $this->searchList = $list; + return $this; } /** diff --git a/code/GridFieldAddNewInlineButton.php b/code/GridFieldAddNewInlineButton.php old mode 100644 new mode 100755 index 38cb95a..8bd2678 --- a/code/GridFieldAddNewInlineButton.php +++ b/code/GridFieldAddNewInlineButton.php @@ -29,9 +29,11 @@ class GridFieldAddNewInlineButton implements GridField_HTMLProvider, GridField_S * Sets the fragment name this button is rendered into. * * @param string $fragment + * @return GridFieldAddNewInlineButton $this */ public function setFragment($fragment) { $this->fragment = $fragment; + return $this; } /** @@ -47,9 +49,11 @@ class GridFieldAddNewInlineButton implements GridField_HTMLProvider, GridField_S * Sets the button title text. * * @param string $title + * @return GridFieldAddNewInlineButton $this */ public function setTitle($title) { $this->title = $title; + return $this; } public function getHTMLFragments($grid) { diff --git a/code/GridFieldAddNewMultiClass.php b/code/GridFieldAddNewMultiClass.php old mode 100644 new mode 100755 index 3f07ec2..47252d4 --- a/code/GridFieldAddNewMultiClass.php +++ b/code/GridFieldAddNewMultiClass.php @@ -34,9 +34,11 @@ class GridFieldAddNewMultiClass implements GridField_HTMLProvider, GridField_URL * Sets the fragment name this button is rendered into. * * @param string $fragment + * @return GridFieldAddNewMultiClass $this */ public function setFragment($fragment) { $this->fragment = $fragment; + return $this; } /** @@ -52,9 +54,11 @@ class GridFieldAddNewMultiClass implements GridField_HTMLProvider, GridField_URL * Sets the button title text. * * @param string $title + * @return GridFieldAddNewMultiClass $this */ public function setTitle($title) { $this->title = $title; + return $this; } /** @@ -93,9 +97,11 @@ class GridFieldAddNewMultiClass implements GridField_HTMLProvider, GridField_URL * Sets the classes that can be created using this button. * * @param array $classes a set of class names, optionally mapped to titles + * @return GridFieldAddNewMultiClass $this */ public function setClasses(array $classes) { $this->classes = $classes; + return $this; } /** diff --git a/code/GridFieldOrderableRows.php b/code/GridFieldOrderableRows.php old mode 100644 new mode 100755 index 02678fd..981e85c --- a/code/GridFieldOrderableRows.php +++ b/code/GridFieldOrderableRows.php @@ -38,9 +38,11 @@ class GridFieldOrderableRows extends RequestHandler implements * Sets the field used to specify the sort. * * @param string $sortField + * @return GridFieldOrderableRows $this */ public function setSortField($field) { $this->sortField = $field; + return $this; } /**