mirror of
https://github.com/processwire/processwire.git
synced 2025-08-18 12:31:17 +02:00
Add PR #241 support pages.find() joinFields option for FieldtypeOptions fields
This commit is contained in:
@@ -278,6 +278,9 @@ class FieldtypeOptions extends FieldtypeMulti implements Module {
|
|||||||
*/
|
*/
|
||||||
public function ___wakeupValue(Page $page, Field $field, $value) {
|
public function ___wakeupValue(Page $page, Field $field, $value) {
|
||||||
if($value) {
|
if($value) {
|
||||||
|
if(is_string($value) && strpos($value, self::multiValueSeparator) !== false) {
|
||||||
|
$value = explode(self::multiValueSeparator, $value);
|
||||||
|
}
|
||||||
$wakeupValue = $this->manager->getOptions($field, array('id' => $value));
|
$wakeupValue = $this->manager->getOptions($field, array('id' => $value));
|
||||||
} else {
|
} else {
|
||||||
$wakeupValue = $this->getBlankValue($page, $field);
|
$wakeupValue = $this->getBlankValue($page, $field);
|
||||||
|
Reference in New Issue
Block a user