protected function getFieldDestinations(array $data, $allowed_destinations = []) {
    $value = NULL;
    if (isset($data['destination'])) {
      $value = $data['destination'];
      if (!empty($allowed_destinations)) {
        foreach ($value as $key => $destination) {
          if (!in_array($destination['value'], $allowed_destinations)) {
            unset($value[$key]);
          }
        }
      }
    }
    return $value;
  }
protected function getFieldDestinations(array $data, $allowed_destinations = []) {
    $value = NULL;
    if (isset($data['destination'])) {
      $value = $data['destination'];
      if (!empty($allowed_destinations)) {
        foreach ($value as $key => $destination) {
          if (!in_array($destination['value'], $allowed_destinations)) {
            unset($value[$key]);
          }
        }
      }
    }
    return $value;
  }
protected function getFieldDestinations ( array $ data , $ allowed_destinations = [ ] ) { $ value = NULL ; if ( isset ( $ data [ 'destination' ] ) ) { $ value = $ data [ 'destination' ] ; if ( ! empty ( $ allowed_destinations ) ) { foreach ( $ value as $ key => $ destination ) { if ( ! in_array ( $ destination [ 'value' ] , $ allowed_destinations ) ) { unset ( $ value [ $ key ] ) ; } } } } return $ value ; }
Get field value for 'destination' field from data array.
Get field value for destination field from data array .