private function filterLocations($value, $key) {
    if (!empty($this->locations) && in_array($key, $this->locations)) {
      return $value;
    }
    return FALSE;
  }
private function filterLocations($value, $key) {
    if (!empty($this->locations) && in_array($key, $this->locations)) {
      return $value;
    }
    return FALSE;
  }
private function filterLocations ( $ value , $ key ) { if ( ! empty ( $ this -> locations ) && in_array ( $ key , $ this -> locations ) ) { return $ value ; } return FALSE ; }
Helper function to filter out disabled locations.

@param string $value
Location name.
@param int $key
Location ID.

@return mixed
Location value.
Helper function to filter out disabled locations .