/** * 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); }
/** * Constructor * * @param $width * @param $template * @param array $boxes */ public function __construct($width, LayoutBoxCollection $boxes) { $this->width = $width; $this->boxes = $boxes->all(); }