Last active
December 14, 2015 08:38
-
-
Save silentworks/5058812 to your computer and use it in GitHub Desktop.
This is how you could return your processor with specific system settings.
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
<?php | |
class MyGetListProcessor extends modObjectGetProcessor { | |
public $classKey = 'className'; | |
public function process() { | |
$data = array(); | |
$settings = array( | |
'emailsender' => $this->modx->getOption('emailsender') | |
); | |
$data['total'] = count($settings); | |
return $this->outputArray($settings, $data['total']);; | |
} | |
} | |
return 'MyGetListProcessor'; |
Weird that modObjectGetProcessor didnt work since it extends modProcessor. Maybe it was missing a required variable. Good to see you got this working anyway and thanks for posting back your working example.
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Hi,
below is the working code (based on your sample)! The modObjectGetProcessor didn't work (at least I couldn't get it to work)
The class returns this Json string and all form field of the panel are filled with it's values:
{"success":true,"data":{"resource_container":"14","test_subject_prefix":"TEST - ","mailing_bulk_size":40,"admin_groups":"Administrator"}}
Thanks again for pushing me to the right direction!