Facet

Contracts

FacetRepositoryContract

The contract for the facet repository

Namespace

Plenty\Modules\Facet\Facet\Contracts

Methods

public search(array $with, array $filters):Collection
Parameters
array $with
array $filters
public listByPlentyId(int $plentyId, string $lang = "de"):array
Parameters
int $plentyId
string $lang
public findOne(int $id):Facet
Parameters
int $id
public create(array $data):Facet
Parameters
array $data
public update(int $id, array $data):Facet
Parameters
int $id
array $data
public delete(int $id):DeleteResponse
Parameters
int $id
public clearCriteria():void

Resets all Criteria filters by creating a new instance of the builder object.

public applyCriteriaFromFilters():void

Applies criteria classes to the current repository.

public setFilters(array $filters = []):void

Sets the filter array.

Parameters
array $filters
public getFilters():void

Returns the filter array.

public getConditions():void

Returns a collection of parsed filters as Condition object

public clearFilters():void

Clears the filter array.

FacetValueRepositoryContract

The contract for the facet value repository

Namespace

Plenty\Modules\Facet\Facet\Contracts

Methods

public search(array $with, array $filters):Collection
Parameters
array $with
array $filters
public create(array $data):FacetValue
Parameters
array $data
public update(int $id, array $data):FacetValue
Parameters
int $id
array $data
public delete(int $id):DeleteResponse
Parameters
int $id
public findOne(int $id):FacetValue
Parameters
int $id
public clearCriteria():void

Resets all Criteria filters by creating a new instance of the builder object.

public applyCriteriaFromFilters():void

Applies criteria classes to the current repository.

public setFilters(array $filters = []):void

Sets the filter array.

Parameters
array $filters
public getFilters():void

Returns the filter array.

public getConditions():void

Returns a collection of parsed filters as Condition object

public clearFilters():void

Clears the filter array.

FacetValueReferenceRepositoryContract

The contract for the facet value reference repository

Namespace

Plenty\Modules\Facet\Facet\Contracts

Methods

public search(array $filters):Collection
Parameters
array $filters
public create(array $data):FacetValueReference
Parameters
array $data
public delete(int $id):DeleteResponse
Parameters
int $id
public findOne(int $id):FacetValueReference
Parameters
int $id
public clearCriteria():void

Resets all Criteria filters by creating a new instance of the builder object.

public applyCriteriaFromFilters():void

Applies criteria classes to the current repository.

public setFilters(array $filters = []):void

Sets the filter array.

Parameters
array $filters
public getFilters():void

Returns the filter array.

public getConditions():void

Returns a collection of parsed filters as Condition object

public clearFilters():void

Clears the filter array.

FacetNameRepositoryContract

The contract for the facet name repository

Namespace

Plenty\Modules\Facet\Facet\Contracts

Methods

public findOne(int $facetId, string $lang):FacetName
Parameters
int $facetId
string $lang
public create(array $data):FacetName
Parameters
array $data
public update(int $facetId, string $lang, array $data):FacetName
Parameters
int $facetId
string $lang
array $data
public delete(int $facetId, string $lang):DeleteResponse
Parameters
int $facetId
string $lang

FacetValueNameRepositoryContract

The contract for the facet value name repository

Namespace

Plenty\Modules\Facet\Facet\Contracts

Methods

public findOne(int $valueId, string $lang):FacetValueName
Parameters
int $valueId
string $lang
public create(array $data):FacetValueName
Parameters
array $data
public update(int $valueId, string $lang, array $data):FacetValueName
Parameters
int $valueId
string $lang
array $data
public delete(int $valueId, string $lang):DeleteResponse
Parameters
int $valueId
string $lang

Models

FacetValue

The facet value model.

Namespace

Plenty\Modules\Facet\Facet\Models

Properties

Type Name Description
int id The unique ID of the facet value
int facetId The unique ID of the facet
string cssClass The css class of the facet value
int position The position of the facet value
string createdAt Timestamp of the date and time the facet value was created.
string updatedAt Timestamp of the last date and time the facet value was updated.
Facet facet
array names
array references

Methods

public toArray()

Returns this model as an array.

FacetValueName

The facet value name model.

Namespace

Plenty\Modules\Facet\Facet\Models

Properties

Type Name Description
int valueId The unique ID of the facet value
string lang The language of the facet value
string name The name of the facet value
FacetValue value

Methods

public toArray()

Returns this model as an array.

Facet

The facet model.

Namespace

Plenty\Modules\Facet\Facet\Models

Properties

Type Name Description
int id The unique ID of the facet
string cssClass
int position The position of the facet. Default value is 1
string sort Allowed sorts are "position", "rate" and "a-z". Default value is "position"
string createdAt Timestamp of the date and time the facet was created.
string updatedAt Timestamp of the last date and time the facet was updated.
string type Allowed types: "dynamic", "producer", "availability", "price". Default value is "dynamic"
int minResultCount Default value is 1
int maxResultCount Default value is 50
string filterMethod Allowed filter methods: "restrict", "multi". Default value is "strict"
array names
array values
array references

Methods

public toArray()

Returns this model as an array.

FacetName

The facet name model.

Namespace

Plenty\Modules\Facet\Facet\Models

Properties

Type Name Description
int facetId The unique ID of the facet
string lang The language of the facet
string name The name of the facet
Facet facet

Methods

public toArray()

Returns this model as an array.

FacetValueReference

The facet value reference model.

Namespace

Plenty\Modules\Facet\Facet\Models

Properties

Type Name Description
int id The unique ID of the facet value reference
int facetId The unique ID of the facet
int facetValueId The unique ID of the facet value
string type Allowed types are "attribute", "character", "producer" and "availability". Default value is "attribute"
int groupId The group ID of the facet value reference. Default value is 0
int valueId The value ID of the facet value reference. Default value is 0
string createdAt Timestamp of the date and time the facet was created.
Facet facet
FacetValue value

Methods

public toArray()

Returns this model as an array.