Hello again
In this part, where you are using xPDOFileVehicle
{
"vehicle_class": "xPDOFileVehicle",
"object": {
"source": "{+properties.modx.context_web_path}assets",
"target": "return MODX_BASE_PATH;"
},
"attributes": {
"vehicle_class": "xPDOFileVehicle"
}
}
you can use FileVehicle, which will look like:
{
"vehicle_class": "\\Teleport\\Transport\\FileVehicle",
"vehicle_parent_class": "xPDOFileVehicle",
"object": {
"in": "{+properties.modx.core_path}components",
"target": "return MODX_CORE_PATH;"
},
"attributes": {
"vehicle_package": "",
"vehicle_class": "\\Teleport\\Transport\\FileVehicle",
"vehicle_parent_class": "xPDOFileVehicle"
}
}
This will use
Symfony2 finder component, so you can pass aditional params, for example "notPath", like this:
{
"vehicle_class": "\\Teleport\\Transport\\FileVehicle",
"vehicle_parent_class": "xPDOFileVehicle",
"object": {
"in": "{+properties.modx.core_path}components",
"notPath": "somedirectory",
"target": "return MODX_CORE_PATH;"
},
"attributes": {
"vehicle_package": "",
"vehicle_class": "\\Teleport\\Transport\\FileVehicle",
"vehicle_parent_class": "xPDOFileVehicle"
}
}
Which will call
$finder->notPath('somedirectory');