Skip to content

Instantly share code, notes, and snippets.

@mylk
Last active August 14, 2016 14:10
Show Gist options
  • Save mylk/96d5fd07d4ee8072cf57435acf47c77a to your computer and use it in GitHub Desktop.
Save mylk/96d5fd07d4ee8072cf57435acf47c77a to your computer and use it in GitHub Desktop.
A Symfony Form choice type of Greek tax offices
<?php
/**
* Greek tax offices as in:
* http://www.gsis.gr/gsis/export/sites/default/gsis_site/PublicIssue/documents_DOY/kwdikoi_doy.pdf
*/
/*
* Installation:
* =============
* # services.yml
* services:
* # ...
* acme.form.greek_tax_offices:
* class: Acme\AcmeBundle\Form\Extension\GreekTaxOfficesType
* tags:
* - { name: form.type, alias: acme.form.greek_tax_offices }
*
* Usage:
* ======
* $builder
* ->add("taxOffice", "acme.form.greek_tax_offices")
* // ...
*/
namespace Acme\AcmeBundle\Form\Extension;
use Symfony\Component\Form\AbstractType;
use Symfony\Component\OptionsResolver\OptionsResolver;
class GreekTaxOfficesType extends AbstractType
{
/**
* {@inheritdoc}
*/
public function configureOptions(OptionsResolver $resolver)
{
$resolver->setDefaults(array(
"choices" => array(
"ΑΓΙΟΥ ΔΗΜΗΤΡΙΟΥ" => "ΑΓΙΟΥ ΔΗΜΗΤΡΙΟΥ",
"ΑΓΙΟΥ ΝΙΚΟΛΑΟΥ ΚΡΗΤΗΣ" => "ΑΓΙΟΥ ΝΙΚΟΛΑΟΥ ΚΡΗΤΗΣ",
"ΑΓΙΩΝ ΑΝΑΡΓΥΡΩΝ" => "ΑΓΙΩΝ ΑΝΑΡΓΥΡΩΝ",
"ΑΓΡΙΝΙΟΥ" => "ΑΓΡΙΝΙΟΥ",
"ΑΙΓΑΛΕΩ" => "ΑΙΓΑΛΕΩ",
"ΑΙΓΙΟΥ" => "ΑΙΓΙΟΥ",
"Α' ΑΘΗΝΩΝ" => "Α' ΑΘΗΝΩΝ",
"Δ' ΑΘΗΝΩΝ" => "Δ' ΑΘΗΝΩΝ",
"ΣΤ' ΑΘΗΝΩΝ" => "ΣΤ' ΑΘΗΝΩΝ",
"ΙΒ' ΑΘΗΝΩΝ" => "ΙΒ' ΑΘΗΝΩΝ",
"ΙΓ' ΑΘΗΝΩΝ" => "ΙΓ' ΑΘΗΝΩΝ",
"ΙΔ' ΑΘΗΝΩΝ" => "ΙΔ' ΑΘΗΝΩΝ",
"ΙΖ' ΑΘΗΝΩΝ" => "ΙΖ' ΑΘΗΝΩΝ",
"Φ.Α.Ε. ΑΘΗΝΩΝ" => "Φ.Α.Ε. ΑΘΗΝΩΝ",
"ΑΛΕΞΑΝΔΡΟΥΠΟΛΗΣ" => "ΑΛΕΞΑΝΔΡΟΥΠΟΛΗΣ",
"ΑΜΑΛΙΑΔΑΣ" => "ΑΜΑΛΙΑΔΑΣ",
"ΑΜΑΡΟΥΣΙΟΥ" => "ΑΜΑΡΟΥΣΙΟΥ",
"ΑΜΠΕΛΟΚΗΠΩΝ ΘΕΣΣΑΛΟΝΙΚΗΣ" => "ΑΜΠΕΛΟΚΗΠΩΝ ΘΕΣΣΑΛΟΝΙΚΗΣ",
"ΑΜΦΙΣΣΑΣ" => "ΑΜΦΙΣΣΑΣ",
"ΑΡΓΟΣΤΟΛΙΟΥ" => "ΑΡΓΟΣΤΟΛΙΟΥ",
"ΑΡΓΟΥΣ" => "ΑΡΓΟΥΣ",
"ΑΡΤΑΣ" => "ΑΡΤΑΣ",
"ΑΧΑΡΝΩΝ" => "ΑΧΑΡΝΩΝ",
"ΒΕΡΟΙΑΣ" => "ΒΕΡΟΙΑΣ",
"ΒΟΛΟΥ" => "ΒΟΛΟΥ",
"ΒΥΡΩΝΟΣ" => "ΒΥΡΩΝΟΣ",
"ΓΑΛΑΤΣΙΟΥ" => "ΓΑΛΑΤΣΙΟΥ",
"ΓΙΑΝΝΙΤΣΩΝ" => "ΓΙΑΝΝΙΤΣΩΝ",
"ΓΛΥΦΑΔΑΣ" => "ΓΛΥΦΑΔΑΣ",
"ΓΡΕΒΕΝΩΝ" => "ΓΡΕΒΕΝΩΝ",
"ΔΡΑΜΑΣ" => "ΔΡΑΜΑΣ",
"ΕΔΕΣΣΑΣ" => "ΕΔΕΣΣΑΣ",
"ΕΛΕΥΣΙΝΑΣ" => "ΕΛΕΥΣΙΝΑΣ",
"ΖΑΚΥΝΘΟΥ" => "ΖΑΚΥΝΘΟΥ",
"ΗΓΟΥΜΕΝΙΤΣΑΣ" => "ΗΓΟΥΜΕΝΙΤΣΑΣ",
"ΗΛΙΟΥΠΟΛΗΣ" => "ΗΛΙΟΥΠΟΛΗΣ",
"ΗΡΑΚΛΕΙΟΥ" => "ΗΡΑΚΛΕΙΟΥ",
"Α' ΘΕΣΣΑΛΟΝΙΚΗΣ" => "Α' ΘΕΣΣΑΛΟΝΙΚΗΣ",
"Δ' ΘΕΣΣΑΛΟΝΙΚΗΣ" => "Δ' ΘΕΣΣΑΛΟΝΙΚΗΣ",
"Ε' ΘΕΣΣΑΛΟΝΙΚΗΣ" => "Ε' ΘΕΣΣΑΛΟΝΙΚΗΣ",
"ΣΤ' ΘΕΣΣΑΛΟΝΙΚΗΣ" => "ΣΤ' ΘΕΣΣΑΛΟΝΙΚΗΣ",
"Ζ' ΘΕΣΣΑΛΟΝΙΚΗΣ" => "Ζ' ΘΕΣΣΑΛΟΝΙΚΗΣ",
"Η' ΘΕΣΣΑΛΟΝΙΚΗΣ" => "Η' ΘΕΣΣΑΛΟΝΙΚΗΣ",
"ΦΑΕ ΘΕΣΣΑΛΟΝΙΚΗΣ" => "ΦΑΕ ΘΕΣΣΑΛΟΝΙΚΗΣ",
"ΘΗΒΩΝ" => "ΘΗΒΩΝ",
"ΘΗΡΑΣ" => "ΘΗΡΑΣ",
"ΙΩΑΝΝΙΝΩΝ" => "ΙΩΑΝΝΙΝΩΝ",
"ΙΩΝΙΑΣ ΘΕΣΣΑΛΟΝΙΚΗΣ" => "ΙΩΝΙΑΣ ΘΕΣΣΑΛΟΝΙΚΗΣ",
"ΚΑΒΑΛΑΣ" => "ΚΑΒΑΛΑΣ",
"ΚΑΛΑΜΑΡΙΑΣ" => "ΚΑΛΑΜΑΡΙΑΣ",
"ΚΑΛΑΜΑΤΑΣ" => "ΚΑΛΑΜΑΤΑΣ",
"ΚΑΛΛΙΘΕΑΣ" => "ΚΑΛΛΙΘΕΑΣ",
"ΚΑΡΔΙΤΣΑΣ" => "ΚΑΡΔΙΤΣΑΣ",
"ΚΑΡΠΕΝΗΣΙΟΥ" => "ΚΑΡΠΕΝΗΣΙΟΥ",
"ΚΑΣΤΟΡΙΑΣ" => "ΚΑΣΤΟΡΙΑΣ",
"ΚΑΤΕΡΙΝΗΣ" => "ΚΑΤΕΡΙΝΗΣ",
"ΚΑΤΟΙΚΩΝ ΕΞΩΤΕΡΙΚΟΥ" => "ΚΑΤΟΙΚΩΝ ΕΞΩΤΕΡΙΚΟΥ",
"ΚΕΝΤΡΟ ΕΛΕΓΧΟΥ ΜΕΓΑΛΩΝ ΕΠΙΧΕΙΡΗΣΕΩΝ (Κ.Ε.ΜΕ.ΕΠ)" => "ΚΕΝΤΡΟ ΕΛΕΓΧΟΥ ΜΕΓΑΛΩΝ ΕΠΙΧΕΙΡΗΣΕΩΝ (Κ.Ε.ΜΕ.ΕΠ)",
"ΚΕΡΚΥΡΑΣ" => "ΚΕΡΚΥΡΑΣ",
"ΚΗΦΙΣΙΑΣ" => "ΚΗΦΙΣΙΑΣ",
"ΚΙΛΚΙΣ" => "ΚΙΛΚΙΣ",
"ΚΟΖΑΝΗΣ" => "ΚΟΖΑΝΗΣ",
"ΚΟΜΟΤΗΝΗΣ" => "ΚΟΜΟΤΗΝΗΣ",
"ΚΟΡΙΝΘΟΥ" => "ΚΟΡΙΝΘΟΥ",
"ΚΟΡΩΠΙΟΥ" => "ΚΟΡΩΠΙΟΥ",
"ΚΥΜΗΣ" => "ΚΥΜΗΣ",
"ΚΩ" => "ΚΩ",
"ΛΑΓΚΑΔΑ" => "ΛΑΓΚΑΔΑ",
"ΛΑΜΙΑΣ" => "ΛΑΜΙΑΣ",
"Α' ΛΑΡΙΣΑΣ" => "Α' ΛΑΡΙΣΑΣ",
"Β' ΛΑΡΙΣΑΣ" => "Β' ΛΑΡΙΣΑΣ",
"ΛΕΥΚΑΔΑΣ" => "ΛΕΥΚΑΔΑΣ",
"ΛΙΒΑΔΕΙΑΣ" => "ΛΙΒΑΔΕΙΑΣ",
"ΜΕΣΟΛΟΓΓΙΟΥ" => "ΜΕΣΟΛΟΓΓΙΟΥ",
"ΜΟΣΧΑΤΟΥ" => "ΜΟΣΧΑΤΟΥ",
"ΜΥΚΟΝΟΥ" => "ΜΥΚΟΝΟΥ",
"ΜΥΤΙΛΗΝΗΣ" => "ΜΥΤΙΛΗΝΗΣ",
"Ν.ΗΡΑΚΛΕΙΟΥ" => "Ν.ΗΡΑΚΛΕΙΟΥ",
"Ν.ΙΩΝΙΑΣ ΒΟΛΟΥ" => "Ν.ΙΩΝΙΑΣ ΒΟΛΟΥ",
"ΝΑΞΟΥ" => "ΝΑΞΟΥ",
"ΝΑΥΠΛΙΟΥ" => "ΝΑΥΠΛΙΟΥ",
"ΝΕΑΣ ΙΩΝΙΑΣ" => "ΝΕΑΣ ΙΩΝΙΑΣ",
"ΝΕΑΣ ΣΜΥΡΝΗΣ" => "ΝΕΑΣ ΣΜΥΡΝΗΣ",
"ΝΕΩΝ ΜΟΥΔΑΝΙΩΝ" => "ΝΕΩΝ ΜΟΥΔΑΝΙΩΝ",
"ΝΙΚΑΙΑΣ" => "ΝΙΚΑΙΑΣ",
"ΞΑΝΘΗΣ" => "ΞΑΝΘΗΣ",
"ΟΡΕΣΤΙΑΔΑΣ" => "ΟΡΕΣΤΙΑΔΑΣ",
"ΠΑΛΑΙΟΥ ΦΑΛΗΡΟΥ" => "ΠΑΛΑΙΟΥ ΦΑΛΗΡΟΥ",
"ΠΑΛΛΗΝΗΣ" => "ΠΑΛΛΗΝΗΣ",
"ΠΑΡΟΥ" => "ΠΑΡΟΥ",
"Α' ΠΑΤΡΩΝ" => "Α' ΠΑΤΡΩΝ",
"Γ' ΠΑΤΡΩΝ" => "Γ' ΠΑΤΡΩΝ",
"Α' ΠΕΙΡΑΙΑ" => "Α' ΠΕΙΡΑΙΑ",
"Γ' ΠΕΙΡΑΙΑ" => "Γ' ΠΕΙΡΑΙΑ",
"Δ' ΠΕΙΡΑΙΑ" => "Δ' ΠΕΙΡΑΙΑ",
"Ε' ΠΕΙΡΑΙΑ" => "Ε' ΠΕΙΡΑΙΑ",
"ΠΛΟΙΩΝ ΠΕΙΡΑΙΑ" => "ΠΛΟΙΩΝ ΠΕΙΡΑΙΑ",
"ΦΑΕ ΠΕΙΡΑΙΑ" => "ΦΑΕ ΠΕΙΡΑΙΑ",
"Α' ΠΕΡΙΣΤΕΡΙΟΥ" => "Α' ΠΕΡΙΣΤΕΡΙΟΥ",
"Β' ΠΕΡΙΣΤΕΡΙΟΥ" => "Β' ΠΕΡΙΣΤΕΡΙΟΥ",
"ΠΟΛΥΓΥΡΟΥ" => "ΠΟΛΥΓΥΡΟΥ",
"ΠΡΕΒΕΖΑΣ" => "ΠΡΕΒΕΖΑΣ",
"ΠΤΟΛΕΜΑΙΔΑΣ" => "ΠΤΟΛΕΜΑΙΔΑΣ",
"ΠΥΡΓΟΥ" => "ΠΥΡΓΟΥ",
"ΡΕΘΥΜΝΟΥ" => "ΡΕΘΥΜΝΟΥ",
"ΡΟΔΟΥ" => "ΡΟΔΟΥ",
"ΣΑΜΟΥ" => "ΣΑΜΟΥ",
"ΣΕΡΡΩΝ" => "ΣΕΡΡΩΝ",
"ΣΠΑΡΤΗΣ" => "ΣΠΑΡΤΗΣ",
"ΣΥΡΟΥ" => "ΣΥΡΟΥ",
"ΤΡΙΚΑΛΩΝ" => "ΤΡΙΚΑΛΩΝ",
"ΤΡΙΠΟΛΗΣ" => "ΤΡΙΠΟΛΗΣ",
"ΦΛΩΡΙΝΑΣ" => "ΦΛΩΡΙΝΑΣ",
"ΧΑΛΑΝΔΡΙΟΥ" => "ΧΑΛΑΝΔΡΙΟΥ",
"ΧΑΛΚΙΔΑ" => "ΧΑΛΚΙΔΑ",
"ΧΑΝΙΩΝ" => "ΧΑΝΙΩΝ",
"ΧΙΟΥ" => "ΧΙΟΥ",
"ΧΟΛΑΡΓΟΥ" => "ΧΟΛΑΡΓΟΥ",
"ΨΥΧΙΚΟΥ" => "ΨΥΧΙΚΟΥ",
),
"choices_as_values" => true
));
}
/**
* {@inheritdoc}
*/
public function getParent()
{
return "choice";
}
/**
* {@inheritdoc}
*/
public function getName()
{
return "acme.form.greek_tax_offices";
}
}
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment