/** * Adds new box to related column collection * * @param LayoutBoxCollection $collection * @param LayoutPageColumnBox $box */ private function addBox(LayoutBoxCollection $collection, LayoutPageColumnBox $box) { // prepare layout box $configurator = $this->getLayoutManager()->getLayoutBoxConfigurator($box->box->type); $layoutBox = new LayoutBox($box, $this->getBoxController($configurator)); // add box to collection $collection->add($layoutBox); }