Chris@0: FALSE, Chris@0: ]; Chris@0: } Chris@0: Chris@0: /** Chris@0: * {@inheritdoc} Chris@0: */ Chris@0: public function build() { Chris@18: return [ Chris@18: '#type' => 'status_messages', Chris@18: '#include_fallback' => TRUE, Chris@18: ]; Chris@0: } Chris@0: Chris@0: /** Chris@0: * {@inheritdoc} Chris@0: */ Chris@0: public function getCacheMaxAge() { Chris@0: // The messages are session-specific and hence aren't cacheable, but the Chris@0: // block itself *is* cacheable because it uses a #lazy_builder callback and Chris@0: // hence the block has a globally cacheable render array. Chris@0: return Cache::PERMANENT; Chris@0: } Chris@0: Chris@0: }