Ok, nearly there,
Converted the component to use Ext3 in a similar manner to how the DocManager component was done, OK this works.
Couple of probs though :-
1. Got one small problem creating a context on install, I’m doing this :-
/* CONTEXT */
$attr = array(
XPDO_TRANSPORT_PRESERVE_KEYS => true,
XPDO_TRANSPORT_UPDATE_OBJECT => true,
XPDO_TRANSPORT_UNIQUE_KEY => array ('key'));
$vehicle = $builder->createVehicle($context, $attr);
$vehicles[] = $vehicle;
where $context is :-
$context = $modx->newObject('modContext');
$context->fromArray(array(
'key' => 'provisioner',
'description' => 'The provisioner component context'
), '', true);
This works, it creates in the DB, you cannot create another one called ’provisioner’ from context management but it will not draw in the resource tree, nor will it appear in the contexts grid. If I create it manually it works Ok. My other stuff creates OK, system settings, categories etc.
2. For some reason this component and doc manager would not live together when their templates were both called ’index.tpl’, smarty seemed to take the latest one from the cache, not the one for the component, so one would render the other wouldn’t depending on which was invoked first, renaming this one to ’pvindex.tpl’ seemed to cure this. Can we clear the directory cache/mgr/smarty on the clearance of the site cache? Mine was full of stuff.