src/wcmf/application/controller/SortController.php
protected function checkObjects($objectMap) {
    $response = $this->getResponse();
    $invalidOids = [];
    foreach ($objectMap as $parameterName => $object) {
      if ($object == null) {
        $invalidOids[] = $parameterName;
      }
    }
    if (sizeof($invalidOids) > 0) {
      $response->addError(ApplicationError::get('OID_INVALID',
        ['invalidOids' => $invalidOids]));
      return false;
    }
    return true;
  }
protected function checkObjects($objectMap) {
    $response = $this->getResponse();
    $invalidOids = [];
    foreach ($objectMap as $parameterName => $object) {
      if ($object == null) {
        $invalidOids[] = $parameterName;
      }
    }
    if (sizeof($invalidOids) > 0) {
      $response->addError(ApplicationError::get('OID_INVALID',
        ['invalidOids' => $invalidOids]));
      return false;
    }
    return true;
  }
protected function checkObjects ( $ objectMap ) { $ response = $ this -> getResponse ( ) ; $ invalidOids = [ ] ; foreach ( $ objectMap as $ parameterName => $ object ) { if ( $ object == null ) { $ invalidOids [ ] = $ parameterName ; } } if ( sizeof ( $ invalidOids ) > 0 ) { $ response -> addError ( ApplicationError :: get ( 'OID_INVALID' , [ 'invalidOids' => $ invalidOids ] ) ) ; return false ; } return true ; }
Check if all objects in the given array are not null and add
an OID_INVALID error to the response, if at least one is
@param $objectMap An associative array with the controller parameter names
as keys and the objects to check as values
@return Boolean
Check if all objects in the given array are not null and add an OID_INVALID error to the response if at least one is