I managed to extend the MODExt combo box that dynamically loads a list of available templates (it’s used in Batcher, in the Resources panel).
However I want to load data from a custom table.
Looking at the original source of MODExt combo, am I correct to assume that the data is loaded by the PHP file pointed to by the "url" config property?
url: MODx.config.connectors_url+'element/template.php'
So, if I wanted data from another table I would need my own PHP file, retrieve the relevant objects, convert them to JSON and return them?
As for the location of that PHP, would it be correct to place it with all the other PHP CRUD files (processors/mgr/myproject/)?
Looking at the template.php file used by MODx combo box, its contents do not make much sense to me:
<?php
require_once dirname(dirname(__FILE__)).'/index.php';
$modx->request->handleRequest(array('location' => 'element/template'));
Thanks.