84 lines
1.9 KiB
PHP
84 lines
1.9 KiB
PHP
<?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 $arResult
|
|
* @return DiscountEntity
|
|
*/
|
|
public function getEntityByResult(array $arResult)
|
|
{
|
|
return parent::getEntityByResult($arResult); // TODO: Change the autogenerated stub
|
|
}
|
|
|
|
/**
|
|
* @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();
|
|
}
|
|
} |