mirror of
https://github.com/silverstripe/silverstripe-framework
synced 2024-10-22 12:05:37 +00:00
Made some methods on SearchFilter public so that SearchFilters can be co-opted for other purposes. Really, moving the magic to a DataQuery object would be better
git-svn-id: svn://svn.silverstripe.com/silverstripe/open/modules/sapphire/trunk@61067 467b73ca-7a2a-4603-9d3b-597d59a354a9
This commit is contained in:
parent
ec9a40ee50
commit
ed07c0acf2
@ -80,7 +80,7 @@ abstract class SearchFilter extends Object {
|
||||
*
|
||||
* @return string
|
||||
*/
|
||||
protected function getDbName() {
|
||||
function getDbName() {
|
||||
// SRM: This code finds the table where the field named $this->name lives
|
||||
// Todo: move to somewhere more appropriate, such as DataMapper, the magical class-to-be?
|
||||
$candidateClass = $this->model;
|
||||
@ -101,7 +101,7 @@ abstract class SearchFilter extends Object {
|
||||
* @param SQLQuery $query
|
||||
* @return SQLQuery
|
||||
*/
|
||||
protected function applyRelation($query) {
|
||||
function applyRelation($query) {
|
||||
if (is_array($this->relation)) {
|
||||
foreach($this->relation as $rel) {
|
||||
$model = singleton($this->model);
|
||||
|
Loading…
x
Reference in New Issue
Block a user