init
This commit is contained in:
@@ -0,0 +1,75 @@
|
||||
<?php
|
||||
|
||||
namespace Bx\Discount\Factory;
|
||||
|
||||
use Bx\Discount\Collection\DiscountCollection;
|
||||
use Bx\Discount\Entity\DiscountEntity;
|
||||
use Bx\Discount\ORM\DiscountTable;
|
||||
use Wt\Core\Factory\AFactory;
|
||||
use Wt\Core\Factory\AORMFactory;
|
||||
|
||||
class DiscountFactory extends AORMFactory
|
||||
{
|
||||
|
||||
/**
|
||||
* @return string|DiscountTable
|
||||
*/
|
||||
protected function __getDataManagerClass()
|
||||
{
|
||||
return DiscountTable::class;
|
||||
}
|
||||
|
||||
public function __getEntityClass()
|
||||
{
|
||||
return DiscountEntity::class;
|
||||
}
|
||||
|
||||
public function __getCachePrefix()
|
||||
{
|
||||
return 'bx_discount';
|
||||
}
|
||||
|
||||
public function __getCollectionClass()
|
||||
{
|
||||
return DiscountCollection::class;
|
||||
}
|
||||
|
||||
/**
|
||||
* @param $id
|
||||
* @return DiscountEntity
|
||||
*/
|
||||
public function getEntityById($id)
|
||||
{
|
||||
return parent::getEntityById($id);
|
||||
}
|
||||
|
||||
/**
|
||||
* @param array $filter
|
||||
* @param array $order
|
||||
* @param array $select
|
||||
* @param null $limit
|
||||
* @param null $offset
|
||||
* @return DiscountCollection|DiscountEntity[]
|
||||
*/
|
||||
public function getCollection($filter = [], $order = [], $select = [], $limit = null, $offset = null)
|
||||
{
|
||||
return parent::getCollection($filter, $order, $select, $limit, $offset); // TODO: Change the autogenerated stub
|
||||
}
|
||||
|
||||
/**
|
||||
* @param array $arIds
|
||||
* @return DiscountCollection|DiscountEntity[]
|
||||
*/
|
||||
public function getEntityByIds(array $arIds)
|
||||
{
|
||||
return parent::getEntityByIds($arIds); // TODO: Change the autogenerated stub
|
||||
}
|
||||
|
||||
/**
|
||||
* @return DiscountTable
|
||||
*/
|
||||
public function getDataManager()
|
||||
{
|
||||
return parent::getDataManager();
|
||||
}
|
||||
}
|
||||
Reference in New Issue
Block a user