sectionCounter.'_'.$fieldCounter); $halfPageSection->addField($field); $sections[] = $halfPageSection; $fieldCounter++; } $rawSection = new RowSection('generated_row_section_'.$this->sectionCounter); foreach($sections as $section) { $rawSection->addSection($section); } $this->addSection($rawSection); $this->sectionCounter++; return $this; } }