extraAttributes[] = $attributes; } else { $this->extraAttributes = [$attributes]; } return $this; } public function getExtraAttributes(): array { $temporaryAttributeBag = new ComponentAttributeBag(); foreach ($this->extraAttributes as $extraAttributes) { $temporaryAttributeBag = $temporaryAttributeBag->merge($this->evaluate($extraAttributes)); } return $temporaryAttributeBag->getAttributes(); } public function getExtraAttributeBag(): ComponentAttributeBag { return new ComponentAttributeBag($this->getExtraAttributes()); } }