private function addMissingElementTypes($groupName) { foreach ($this->elements->getAll() as $type) { if (!isset($this->groups[$groupName][$type])) { $this->groups[$groupName][$type] = []; } } }