Skip to content

Commit 712b5d5

Browse files
committed
Move the getFilterUrlValue function.
Move the function to the base class, cause both version need it.
1 parent b823edd commit 712b5d5

File tree

2 files changed

+14
-14
lines changed

2 files changed

+14
-14
lines changed

src/MetaModels/Attribute/Select/AbstractSelect.php

+14
Original file line numberDiff line numberDiff line change
@@ -270,4 +270,18 @@ public function convertValuesToValueIds($values)
270270

271271
return $objSelectIds->fetchEach($idColumn);
272272
}
273+
274+
/**
275+
* Convert a native attribute value into a value to be used in a filter Url.
276+
*
277+
* This returns the value of the alias if any defined or the value of the id otherwise.
278+
*
279+
* @param mixed $varValue The source value.
280+
*
281+
* @return string
282+
*/
283+
public function getFilterUrlValue($varValue)
284+
{
285+
return urlencode($varValue[$this->getAliasColumn()]);
286+
}
273287
}

src/MetaModels/Attribute/Select/Select.php

-14
Original file line numberDiff line numberDiff line change
@@ -121,20 +121,6 @@ public function widgetToValue($varValue, $itemId)
121121
return $objValue->row();
122122
}
123123

124-
/**
125-
* Convert a native attribute value into a value to be used in a filter Url.
126-
*
127-
* This returns the value of the alias if any defined or the value of the id otherwise.
128-
*
129-
* @param mixed $varValue The source value.
130-
*
131-
* @return string
132-
*/
133-
public function getFilterUrlValue($varValue)
134-
{
135-
return urlencode($varValue[$this->getAliasColumn()]);
136-
}
137-
138124
/**
139125
* Determine the correct sorting column to use.
140126
*

0 commit comments

Comments
 (0)