update
This commit is contained in:
@@ -0,0 +1,40 @@
|
||||
<?php
|
||||
|
||||
namespace Hura8\Components\Marketing\AdminController;
|
||||
|
||||
use Hura8\Components\Marketing\Controller\bCouponController;
|
||||
use Hura8\Interfaces\iEntityAdminController;
|
||||
use Hura8\Traits\AdminEntityBaseControllerTraits;
|
||||
|
||||
class ACouponController extends bCouponController implements iEntityAdminController
|
||||
{
|
||||
|
||||
use AdminEntityBaseControllerTraits;
|
||||
|
||||
|
||||
public function updateProduct($product_id, $coupon_id, array $info)
|
||||
{
|
||||
return $this->objCouponModel->updateProduct($product_id, $coupon_id, $info);
|
||||
}
|
||||
|
||||
|
||||
public function removeProduct($product_id, $coupon_id)
|
||||
{
|
||||
return $this->objCouponModel->removeProduct($product_id, $coupon_id);
|
||||
}
|
||||
|
||||
|
||||
public function addProduct($product_id, $coupon_id, $ordering=0)
|
||||
{
|
||||
return $this->objCouponModel->addProduct($product_id, $coupon_id, $ordering);
|
||||
}
|
||||
|
||||
|
||||
protected function deleteFileBeforeDeleteItem($item_id): bool
|
||||
{
|
||||
// TODO: Implement deleteFileBeforeDeleteItem() method.
|
||||
return true;
|
||||
}
|
||||
|
||||
|
||||
}
|
||||
@@ -0,0 +1,26 @@
|
||||
<?php
|
||||
|
||||
namespace Hura8\Components\Marketing\AdminController;
|
||||
|
||||
|
||||
use Hura8\Components\Marketing\Model\PosterModel;
|
||||
use Hura8\System\Controller\aAdminEntityBaseController;
|
||||
|
||||
class APosterController extends aAdminEntityBaseController
|
||||
{
|
||||
/* @var PosterModel $objPosterModel */
|
||||
protected $objPosterModel;
|
||||
|
||||
public function __construct()
|
||||
{
|
||||
$this->objPosterModel = new PosterModel();
|
||||
parent::__construct($this->objPosterModel);
|
||||
}
|
||||
|
||||
|
||||
protected function deleteFileBeforeDeleteItem($item_id): bool
|
||||
{
|
||||
// TODO: Implement deleteFileBeforeDeleteItem() method.
|
||||
return true;
|
||||
}
|
||||
}
|
||||
@@ -0,0 +1,51 @@
|
||||
<?php
|
||||
|
||||
namespace Hura8\Components\Marketing\AdminController;
|
||||
|
||||
use Hura8\Components\Marketing\Controller\bProductFeedController;
|
||||
use Hura8\Components\Marketing\Model\ProductFeedModel;
|
||||
use Hura8\Interfaces\iEntityAdminController;
|
||||
use Hura8\System\Controller\aAdminEntityBaseController;
|
||||
use Hura8\Traits\AdminEntityBaseControllerTraits;
|
||||
|
||||
|
||||
class AProductFeedController extends bProductFeedController implements iEntityAdminController
|
||||
{
|
||||
|
||||
use AdminEntityBaseControllerTraits;
|
||||
|
||||
public function getAllCategories() {
|
||||
return $this->objProductFeedModel->getAllCategories();
|
||||
}
|
||||
|
||||
public function getAllProductListIds( $list_id){
|
||||
return $this->objProductFeedModel->getAllProductListIds($list_id);
|
||||
}
|
||||
|
||||
public function getProductListTotal($list_id) {
|
||||
return $this->objProductFeedModel->getProductListTotal($list_id);
|
||||
}
|
||||
|
||||
public function getProductList($list_id, $page = 1, $numPerPage = 30) {
|
||||
return $this->objProductFeedModel->getProductList($list_id, $page, $numPerPage);
|
||||
}
|
||||
|
||||
public function deleteAllProductFromList($list_id) {
|
||||
$this->objProductFeedModel->deleteAllProductFromList($list_id);
|
||||
}
|
||||
|
||||
//remove product from a list
|
||||
public function deleteProductFromList($pro_list, $list_id){
|
||||
return $this->objProductFeedModel->deleteProductFromList($pro_list, $list_id);
|
||||
}
|
||||
|
||||
//add product to a list
|
||||
public function addProductToList($pro_list, $list_id){
|
||||
return $this->objProductFeedModel->addProductToList($pro_list, $list_id);
|
||||
}
|
||||
|
||||
protected function deleteFileBeforeDeleteItem($item_id): bool
|
||||
{
|
||||
return true;
|
||||
}
|
||||
}
|
||||
Reference in New Issue
Block a user