PHP Class ProductRepository

Inheritance: extends RepositoryBase
Exibir arquivo Open project: yupe/yupe Class Usage Examples

Protected Properties

Property Type Description
$attributeFilter

Public Methods

Method Description
getByBrandProvider ( Producer $producer ) : CActiveDataProvider Get products by brand
getByFilter ( array $mainSearchAttributes, array $typeSearchAttributes ) : CActiveDataProvider
getById ( $id, array $with = ['producer', 'type.typeAttributes', 'images', 'category', 'variants'] ) : mixed
getByIds ( array $ids ) : CActiveDataProvider
getBySlug ( $slug, array $with = ['producer', 'type.typeAttributes', 'images', 'category', 'variants', 'attributesValues'] ) : mixed
getListForCategory ( StoreCategory $category, boolean $withChild = true, null $limit = null ) : CActiveDataProvider
getListForIndexPage ( ) : CActiveDataProvider
init ( )
search ( $query ) : array
searchByName ( $name ) : array | mixed | null

Protected Methods

Method Description
buildCriteriaForTypeAttributes ( array $typeSearchAttributes ) : CDbCriteria

Method Details

buildCriteriaForTypeAttributes() protected method

protected buildCriteriaForTypeAttributes ( array $typeSearchAttributes ) : CDbCriteria
$typeSearchAttributes array
return CDbCriteria

getByBrandProvider() public method

Get products by brand
public getByBrandProvider ( Producer $producer ) : CActiveDataProvider
$producer Producer
return CActiveDataProvider

getByFilter() public method

public getByFilter ( array $mainSearchAttributes, array $typeSearchAttributes ) : CActiveDataProvider
$mainSearchAttributes array
$typeSearchAttributes array
return CActiveDataProvider

getById() public method

public getById ( $id, array $with = ['producer', 'type.typeAttributes', 'images', 'category', 'variants'] ) : mixed
$id
$with array
return mixed

getByIds() public method

public getByIds ( array $ids ) : CActiveDataProvider
$ids array
return CActiveDataProvider

getBySlug() public method

public getBySlug ( $slug, array $with = ['producer', 'type.typeAttributes', 'images', 'category', 'variants', 'attributesValues'] ) : mixed
$slug
$with array
return mixed

getListForCategory() public method

public getListForCategory ( StoreCategory $category, boolean $withChild = true, null $limit = null ) : CActiveDataProvider
$category StoreCategory
$withChild boolean
$limit null
return CActiveDataProvider

getListForIndexPage() public method

public getListForIndexPage ( ) : CActiveDataProvider
return CActiveDataProvider

init() public method

public init ( )

searchByName() public method

public searchByName ( $name ) : array | mixed | null
$name
return array | mixed | null

Property Details

$attributeFilter protected_oe property

protected $attributeFilter