2017 © Pedro Peláez
 

library german-holiday-bundle

German Holidays

image

pmdevelopment/german-holiday-bundle

German Holidays

  • Sunday, October 8, 2017
  • by pmdevelopment
  • Repository
  • 1 Watchers
  • 0 Stars
  • 22 Installations
  • PHP
  • 0 Dependents
  • 0 Suggesters
  • 0 Forks
  • 0 Open issues
  • 2 Versions
  • 22 % Grown

The README.md

german-holiday-bundle

Get german legal holidays as symfony2 bundle., (*1)

--, (*2)

Deutsche gesetzliche Feiertage für Symfony2 als Bundle., (*3)

Setup

Add to AppKernel, (*4)

new PM\Bundle\GermanHolidayBundle\PMGermanHolidayBundle(),

Warnings

German holidays are a mess. Corpus christi is city based in Saxony and Thuringia, Assumption day in Bavaria. Those holidays are ignored for those states. Also you should always use the real year you are looking for, because in 2017 reformation day is country wide, so in this year the holidays are different., (*5)

Usage

Forms

Your Users probably need the state connection., (*6)

->add('state', ChoiceType::class, [
    'label'                     => 'label.state',
    'choices_as_values'         => true,
    'choice_translation_domain' => 'PMGermanHolidayBundle',
    'choices'                   => States::getAll(),
    'required'                  => false,
    'preferred_choices'         => [
        States::HESSE,
    ],
    'placeholder'               => 'help.empty',
])

Get All

You can get all holidays by year. De result uses the Holiday object., (*7)

$holidays = $this->getContainer()->get('pm_german_holiday.services.holiday_service')->getAll($year);

More Stuff

The services uses some helper you can also use to get holidays by state or all holidays for one state., (*8)

The Versions

08/10 2017

dev-master

9999999-dev

German Holidays

  Sources   Download

MIT

The Requires

  • php ^5.5.0|^7.0.19

 

08/10 2017

1.0.0

1.0.0.0

German Holidays

  Sources   Download

MIT

The Requires

  • php ^5.5.0|^7.0.19