leftSection = new HalfPageSection('leftSection'); $this->rightSection = new HalfPageSection('rightSection'); $this->addSection($this->leftSection) ->addSection($this->rightSection); $this->initFields(); } protected function initFields() { } public function addField($field){ $total = count($this->leftSection->getFields()) + count($this->rightSection->getFields()); if($total % 2 == 0){ $this->leftSection->addField($field); }else{ $this->rightSection->addField($field); } return $this; } }