/**
  * @param PresetAreaLayout $layout
  */
 public function publish(AreaLayout $layout)
 {
     $preset = Preset::getByID($layout->getPreset());
     $arLayout = PresetLayout::add($preset);
     foreach ($layout->getColumns() as $column) {
         $arLayout->addLayoutColumn();
     }
     return $arLayout;
 }
 /**
  * @param CustomAreaLayout $layout
  */
 public function publish(AreaLayout $layout)
 {
     $arLayout = CustomLayout::add($layout->getSpacing(), $layout->getHasCustomWidths());
     foreach ($layout->getColumns() as $column) {
         /*
          * @var $column CustomAreaLayoutColumn
          */
         $columnObject = $arLayout->addLayoutColumn();
         $columnObject->setAreaLayoutColumnWidth($column->getWidth());
     }
     return $arLayout;
 }
 /**
  * @param ThemeGridAreaLayout $layout
  */
 public function publish(AreaLayout $layout)
 {
     $arLayout = ThemeGridLayout::add();
     foreach ($layout->getColumns() as $column) {
         /*
          * @var $column ThemeGridAreaLayoutColumn
          */
         $columnObject = $arLayout->addLayoutColumn();
         $columnObject->setAreaLayoutColumnSpan($column->getSpan());
         $columnObject->setAreaLayoutColumnOffset($column->getOffset());
     }
     return $arLayout;
 }