Skip to content

Workflows and calendar

Option Default Purpose
$workflowBlocks [] providers of building blocks (Anvil\Workflow\BlockProvider): guards, effects, forms, resolvers
public array $workflowBlocks = [\App\Workflows\OrderBlocks::class];

See Building blocks.

Durations of workflow steps and due dates of tasks are counted in working days.

Option Default Purpose
$workingDays [1, 2, 3, 4, 5] ISO weekdays, 1 (Monday) to 7 (Sunday)
$holidayProvider null class implementing Anvil\Calendar\HolidayProvider
$holidayRegion null region passed to the provider
$closedDays [] further days without work: '12-24' every year or '2026-12-28' once
public array $workingDays = [1, 2, 3, 4, 5];
public ?string $holidayProvider = \Anvil\Calendar\GermanHolidays::class;
public ?string $holidayRegion = 'BW'; // Baden-Württemberg
public array $closedDays = ['12-24', '12-31'];
  • GermanHolidays knows the public holidays of Germany and of every federal state: BW, BY, BE, BB, HB, HH, HE, MV, NI, NW, RP, SL, SN, ST, SH, TH. Without a region only the holidays of the whole country count.
  • Other countries implement HolidayProvider (holidays(int $year) returning Y-m-d => name); the region is passed to its constructor.
  • $holidayRegion can be set per environment: anvil.holidayRegion = BY.
  • A changed calendar applies to new due dates; existing deadlines stay.

See Durations and deadline.