You are here

public function FormAssemblyRequest::extractCategories in FormAssembly 7

Parameters

array $forms: the processing array for forms

array $Category: a Category array - may contain additional Category arrays

1 call to FormAssemblyRequest::extractCategories()
FormAssemblyRequest::processResponses in includes/FormAssemblyRequest.php
process responses property into forms array

File

includes/FormAssemblyRequest.php, line 304
Authorizes the current site and handles API requests to FormAssembly.

Class

FormAssemblyRequest
@file Authorizes the current site and handles API requests to FormAssembly.

Code

public function extractCategories(array &$forms, array $Category) {
  foreach ($Category as $formset) {
    if (!empty($formset['Category'])) {
      $this
        ->extractCategories($forms, $formset['Category']);
    }
    if (!empty($formset['Forms'])) {
      $forms = array_merge($forms, $formset['Forms']);
    }
  }
}