In my application I have a reference to Operations Automation subscription, in custom UI it is possible to fetch subscription resources related to my application with a
When I try to fetch the same URL from PHP runtime like this:
$resources = \APS\Request::getController()->GetResources(null, 'aps/2/resources/'.$this->subscription->aps->id.'/resources');
, I get an empty array.
GetResources method can only work with children of
'APS::ResourceBase' class, and
'SubscriptionResource' is not descended from it.
Starting from PHP runtime
aps-php-runtime-2.0-287 you can fetch subscription resources like this:
If you do not have a link to subscription in your application resource:
$subscrResource = $apsc->getResource($subscr_resource_id); $resources = $subscrResource->resources();
If your application resource has a link to subscription:
$resources = $this->subscription->resources();
Properties of the
'SubscriptionResource' structure are described in documentation