mirror of
https://github.com/symbiote/silverstripe-gridfieldextensions.git
synced 2024-10-22 17:05:39 +02:00
Merge pull request #17 from Zauberfisch/master
Return $this on all setters
This commit is contained in:
commit
8b9ea0e1d6
6
code/GridFieldAddExistingSearchButton.php
Normal file → Executable file
6
code/GridFieldAddExistingSearchButton.php
Normal file → Executable file
@ -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;
|
||||
}
|
||||
|
||||
/**
|
||||
|
4
code/GridFieldAddNewInlineButton.php
Normal file → Executable file
4
code/GridFieldAddNewInlineButton.php
Normal file → Executable file
@ -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) {
|
||||
|
6
code/GridFieldAddNewMultiClass.php
Normal file → Executable file
6
code/GridFieldAddNewMultiClass.php
Normal file → Executable file
@ -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;
|
||||
}
|
||||
|
||||
/**
|
||||
|
2
code/GridFieldOrderableRows.php
Normal file → Executable file
2
code/GridFieldOrderableRows.php
Normal file → Executable file
@ -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;
|
||||
}
|
||||
|
||||
/**
|
||||
|
Loading…
Reference in New Issue
Block a user