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