diff --git a/src/AppBundle/Admin/AuthorityAdmin.php b/src/AppBundle/Admin/AuthorityAdmin.php new file mode 100644 index 0000000..bb1e0ad --- /dev/null +++ b/src/AppBundle/Admin/AuthorityAdmin.php @@ -0,0 +1,51 @@ +add('title') + ->add('description') + ->add('street') + ->add('houseNumber') + ->add('zipCode') + ->add('city') + ->add('latitude') + ->add('longitude') + ->add('polygon') + ; + } + + // Fields to be shown on filter forms + protected function configureDatagridFilters(DatagridMapper $datagridMapper) + { + $datagridMapper + ->add('title') + ; + } + + // Fields to be shown on lists + protected function configureListFields(ListMapper $listMapper) + { + $listMapper + ->addIdentifier('title') + ; + } + + // Fields to be shown on show action + protected function configureShowFields(ShowMapper $showMapper) + { + $showMapper + ->add('title') + ; + } +} diff --git a/src/AppBundle/Entity/Authority.php b/src/AppBundle/Entity/Authority.php new file mode 100644 index 0000000..5f837e5 --- /dev/null +++ b/src/AppBundle/Entity/Authority.php @@ -0,0 +1,219 @@ +id; + } + + public function getTitle(): ?string + { + return $this->title; + } + + public function setTitle(string $title): Authority + { + $this->title = $title; + + return $this; + } + + public function getDescription(): ?string + { + return $this->description; + } + + public function setDescription(string $description): Authority + { + $this->description = $description; + + return $this; + } + + public function getAddress(): ?string + { + return $this->address; + } + + public function setAddress(string $address): Authority + { + $this->address = $address; + + return $this; + } + + public function getStreet(): ?string + { + return $this->street; + } + + public function setStreet(string $street): Authority + { + $this->street = $street; + return $this; + } + + public function getHouseNumber(): ?string + { + return $this->houseNumber; + } + + public function setHouseNumber(string $houseNumber): Authority + { + $this->houseNumber = $houseNumber; + + return $this; + } + + public function getZipCode(): ?string + { + return $this->zipCode; + } + + public function setZipCode(string $zipCode): Authority + { + $this->zipCode = $zipCode; + + return $this; + } + + public function getCity(): ?string + { + return $this->city; + } + + public function setCity(string $city): Authority + { + $this->city = $city; + + return $this; + } + + public function getPolygon(): ?string + { + return $this->polygon; + } + + public function setPolygon(string $polygon): Authority + { + $this->polygon = $polygon; + + return $this; + } + + public function getLatitude(): ?float + { + return $this->latitude; + } + + public function setLatitude(float $latitude): CoordinateInterface + { + $this->latitude = $latitude; + + return $this; + } + + public function getLongitude(): ?float + { + return $this->longitude; + } + + public function setLongitude(float $longitude): CoordinateInterface + { + $this->longitude = $longitude; + return $this; + } + + public function getPin(): string + { + return $this->latitude . ',' . $this->longitude; + } +} diff --git a/src/AppBundle/Resources/config/admin.xml b/src/AppBundle/Resources/config/admin.xml index 584af6d..28b5f1b 100644 --- a/src/AppBundle/Resources/config/admin.xml +++ b/src/AppBundle/Resources/config/admin.xml @@ -24,5 +24,15 @@ AppBundle + + + + + AppBundle\Entity\Authority + + + AppBundle + + diff --git a/src/AppBundle/Resources/views/Incident/show.html.twig b/src/AppBundle/Resources/views/Incident/show.html.twig index 1c13d93..ea79ac9 100644 --- a/src/AppBundle/Resources/views/Incident/show.html.twig +++ b/src/AppBundle/Resources/views/Incident/show.html.twig @@ -143,6 +143,18 @@
+
+

+ Zuständigkeit prüfen +

+ +

+ + Zuständigkeit prüfen + +

+
+

Details