<?php
namespace admin\controls;

class Baselinker {

  // widok wiązania produktów
  static public function bundling_products() {
    return \Tpl::view( 'baselinker/bundling-products', [
      'products' => \admin\factory\ShopProduct::products_list_for_baselinker(),
      'baselinker_products' => \admin\factory\Baselinker::products_list()
    ] );
  }

  // zapis wiązania produktów
  static public function bundling_products_save() {
    \admin\factory\Baselinker::bundling_products_save( $_POST );
    header( 'Location: /admin/baselinker/bundling_products/' );
    exit;
  }
}