| null */ protected ?array $cachedFooterActions = null; /** * @var array */ protected array $footerActions = []; /** * @param array $actions */ public function footerActions(array $actions): static { $this->footerActions = [ ...$this->footerActions, ...$actions, ]; return $this; } /** * @return array */ public function getFooterActions(): array { return $this->cachedFooterActions ?? $this->cacheFooterActions(); } /** * @return array */ public function cacheFooterActions(): array { $this->cachedFooterActions = []; foreach ($this->footerActions as $footerAction) { foreach (Arr::wrap($this->evaluate($footerAction)) as $action) { $this->cachedFooterActions[$action->getName()] = $this->prepareAction($action); } } return $this->cachedFooterActions; } }