You are here

protected static function StateToAbbrev::getStateList in Tamper 8

Get the state and abbreviation list.

Return value

array List of state abbreviations, keyed by lower case state name.

1 call to StateToAbbrev::getStateList()
StateToAbbrev::tamper in src/Plugin/Tamper/StateToAbbrev.php
Tamper data.

File

src/Plugin/Tamper/StateToAbbrev.php, line 26

Class

StateToAbbrev
Plugin implementation for converting state to abbreviation.

Namespace

Drupal\tamper\Plugin\Tamper

Code

protected static function getStateList() {
  $states = [
    'alabama' => 'AL',
    'alaska' => 'AK',
    'arizona' => 'AZ',
    'american samoa' => 'AS',
    'arkansas' => 'AR',
    'california' => 'CA',
    'colorado' => 'CO',
    'connecticut' => 'CT',
    'delaware' => 'DE',
    'district of columbia' => 'DC',
    'federated states of micronesia' => 'FM',
    'florida' => 'FL',
    'georgia' => 'GA',
    'guam' => 'GU',
    'hawaii' => 'HI',
    'idaho' => 'ID',
    'illinois' => 'IL',
    'indiana' => 'IN',
    'iowa' => 'IA',
    'kansas' => 'KS',
    'kentucky' => 'KY',
    'louisiana' => 'LA',
    'maine' => 'ME',
    'maryland' => 'MD',
    'massachusetts' => 'MA',
    'marshall islands' => 'MH',
    'michigan' => 'MI',
    'minnesota' => 'MN',
    'mississippi' => 'MS',
    'missouri' => 'MO',
    'montana' => 'MT',
    'nebraska' => 'NE',
    'nevada' => 'NV',
    'new hampshire' => 'NH',
    'new jersey' => 'NJ',
    'new mexico' => 'NM',
    'new york' => 'NY',
    'north carolina' => 'NC',
    'north dakota' => 'ND',
    'northern mariana islands' => 'MP',
    'ohio' => 'OH',
    'oklahoma' => 'OK',
    'oregon' => 'OR',
    'pennsylvania' => 'PA',
    'palau' => 'PW',
    'puerto rico' => 'PR',
    'rhode island' => 'RI',
    'south carolina' => 'SC',
    'south dakota' => 'SD',
    'tennessee' => 'TN',
    'texas' => 'TX',
    'utah' => 'UT',
    'vermont' => 'VT',
    'virginia' => 'VA',
    'virgin islands' => 'VI',
    'washington' => 'WA',
    'west virginia' => 'WV',
    'wisconsin' => 'WI',
    'wyoming' => 'WY',
  ];
  return $states;
}