diff --git a/CRM/Resource/BAO/ResourceDemand.php b/CRM/Resource/BAO/ResourceDemand.php index 4297a90..1e86e4a 100644 --- a/CRM/Resource/BAO/ResourceDemand.php +++ b/CRM/Resource/BAO/ResourceDemand.php @@ -120,7 +120,8 @@ public function isFulfilledWithResource($resource, $cached = true, &$error_list * * @param $count integer maximal number of resources * - * @return array list of CRM_Resource_BAO_Resource + * @return CRM_Resource_BAO_Resource[] + * A list of possible resources to fulfill the demand. */ public function getResourceCandidates($count) { diff --git a/CRM/Resource/Form/DemandAssignments.php b/CRM/Resource/Form/DemandAssignments.php index 270271d..aea2b16 100644 --- a/CRM/Resource/Form/DemandAssignments.php +++ b/CRM/Resource/Form/DemandAssignments.php @@ -52,12 +52,12 @@ public function buildQuickForm() $display_resources = []; foreach ($this->assigned_resources as $resource) { /** @var CRM_Resource_BAO_Resource $resource */ - $display_candidate = $resource->toArray(); - $display_candidate['id'] = $resource->id; - $display_candidate['field_name'] = "unassign_{$resource->id}"; - $display_candidate['meets_demand'] = $this->resource_demand->isFulfilledWithResource($resource); - $display_candidate['paths']['view'] = $candidate->getEntityUrl('view'); - $display_resources[] = $display_candidate; + $display_resource = $resource->toArray(); + $display_resource['id'] = $resource->id; + $display_resource['field_name'] = "unassign_{$resource->id}"; + $display_resource['meets_demand'] = $this->resource_demand->isFulfilledWithResource($resource); + $display_resource['paths']['view'] = $resource->getEntityUrl('view'); + $display_resources[] = $display_resource; } // assign some stuff diff --git a/templates/CRM/Resource/Form/DemandAssignments.tpl b/templates/CRM/Resource/Form/DemandAssignments.tpl index bcf1475..f364d5b 100644 --- a/templates/CRM/Resource/Form/DemandAssignments.tpl +++ b/templates/CRM/Resource/Form/DemandAssignments.tpl @@ -33,7 +33,7 @@