Thanks Bruno, that should get me on my way...
Brick wall hit though when I load my processor, modx is picking up the class name returned, but then errors with class not defined?!
<?php
class McmCampaignGetListProcessor extends modObjectGetListProcessor {
public $languageTopics = array('mcm:default');
public $defaultSortField = 'last_sent';
public $defaultSortDirection = 'DESC';
public $classKey = 'MCMCampaign';
public $objectType = 'mcm.campaign';
public function initialize(){
return parent::initialize();
}//
public function process() {
$limit = intval($this->getProperty('limit'));
$start = intval($this->getProperty('start'));
$sort = $this->getProperty('sort');
$dir = $this->getProperty('dir');
if ($data_array = $yourApi->getData($start,$limit,$sort,$dir)){
$total = $yourApi->getTotal;
}
else{
return $this->failure('Error');
}
return $this->outputArray($data_array,$total);
}//
};// end class McmCampaignGetListProcessor
return 'McmCampaignGetListProcessor';
If I change the return value, the error reflects it, so the file is clearly being loaded, but for some reason it cant find the class that is declared directly above?!
EDIT: And just to head-off any repurcussions... yes i am aware that my process function is guff... just for example...
[ed. note: alanpich last edited this post 14 years, 5 months ago.]