Property

Contracts

PropertyGroupOptionRepositoryContract

This interface allows you to get, create, update and delete property group options.

Namespace

Plenty\Modules\Property\Contracts

Methods

public getGroupOption(int $groupOptionId):PropertyGroupOption

Get a group option. The ID of the group option must be specified.

Parameters
int $groupOptionId The ID of the group option
public listGroupOptions():array

List group options

public createGroupOption(array $data):PropertyGroupOption

Creates a group option

Parameters
array $data The request data
public updateGroupOption(int $groupOptionId, array $data):PropertyGroupOption

Updates a group option. The ID of group option must be specified.

Parameters
int $groupOptionId The ID of the group option
array $data The request data
public deleteGroupOption(int $groupOptionId):array

Deletes a group option. The ID of group option must be specified.

Parameters
int $groupOptionId The ID of the group option
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.

PropertyRelationRepositoryContract

This interface allows you to get, create, update and delete property relations.

Namespace

Plenty\Modules\Property\Contracts

Methods

public getRelation(int $relationId):PropertyRelation

Gets a property relation. The ID of the property relation must be specified.

Parameters
int $relationId
public listRelations($filters = []):array

List property relations

Parameters
$filters
public createRelation(array $data):PropertyRelation

Creates a property relation

Parameters
array $data The request data
public updateRelation(int $relationId, array $data):PropertyRelation

Updates a property relation. The ID of property relation must be specified.

Parameters
int $relationId
array $data
public deleteRelation(int $relationId):void

Deletes a property relation. The ID of property relation must be specified.

Parameters
int $relationId
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.

PropertyRelationMarkupRepositoryContract

This interface allows you to get, list, create, update and delete property relation markups.

Namespace

Plenty\Modules\Property\Contracts

Methods

public getRelationMarkup(int $relationMarkupId):PropertyRelationMarkup

Get a property relation markup. The ID of the property relation markup must be specified.

Parameters
int $relationMarkupId
public listRelationMarkups():array

List property relation markups

public createRelationMarkup(array $data):PropertyRelationMarkup

Creates a property relation markup

Parameters
array $data The request data
public updateRelationMarkup(int $relationMarkupId, array $data):PropertyRelationMarkup

Updates a property relation markup. The ID of property relation markup must be specified.

Parameters
int $relationMarkupId
array $data
public deleteRelationMarkup(int $relationMarkupId):void

Deletes a property relation markup. The ID of property relation markup must be specified.

Parameters
int $relationMarkupId
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.

PropertyGroupRepositoryContract

This interface allows you to get, list, create, update and delete property groups. Property groups help to structure properties.

Namespace

Plenty\Modules\Property\Contracts

Methods

public getGroup(int $groupId):PropertyGroup

Gets a property group. The ID of the group must be specified.

Parameters
int $groupId The ID of the group
public listGroups(int $page = 1, int $itemsPerPage = 50, array $with = [], array $filters = [], int $paginate = 1):array

Lists property groups

Parameters
int $page The page to get. The default page that will be returned is page 1. See also $paginate.
int $itemsPerPage The number of groups to be displayed per page. The default number of groups per page is 50. See also $paginate.
array $with The relations available are:
  1. properties,
  2. options and
  3. names.
array $filters The filters allow to reduce the results listed. The following filters are currently availablle:
  1. ID
  2. name
  3. lang
  4. optionIdentifier
  5. groupType
  6. surchargeType/li>
int $paginate Defines whether or not the result will be a paginated result or a list with all results. If 1 is given for the parameter, the result will be paginated.
public createGroup(array $data):PropertyGroup

Creates a property group

Parameters
array $data The request data
public updateGroup(int $groupId, array $data):PropertyGroup

Updates a property group. The ID of group must be specified.

Parameters
int $groupId The ID of the group
array $data The request data
public deleteGroup(int $groupId):array

Deletes a property group. The ID of group must be specified.

Parameters
int $groupId The ID of the group
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.

PropertyGroupNameRepositoryContract

This interface allows you to get, list, create, update and delete property group names.

Namespace

Plenty\Modules\Property\Contracts

Methods

public getGroupName(int $groupNameId):PropertyGroupName

Gets a group name. The ID of the group name must be specified.

Parameters
int $groupNameId The ID of the group name
public listGroupNames():array

Lists group names

public createGroupName(array $data):PropertyGroupName

Creates a group name

Parameters
array $data The request data
public updateGroupName(int $groupNameId, array $data):PropertyGroupName

Updates a group name. The ID of the group name must be specified.

Parameters
int $groupNameId The ID of the group name
array $data The request data
public deleteGroupName(int $groupNameId):array

Deletes a group name. The ID of group name must be specified.

Parameters
int $groupNameId The ID of the group name
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.

PropertyAmazonRepositoryContract

This interface allows you to get, create, update and delete property amazons.

Namespace

Plenty\Modules\Property\Contracts

Methods

public getPropertyAmazon(int $propertyAmazonId):PropertyAmazon

Gets a property amazon. The ID of the property amazon must be specified.

Parameters
int $propertyAmazonId
public listPropertyAmazons(array $with = [], array $filters = []):array

List property amazons

Parameters
array $with
array $filters The filter available is:
  1. propertyId
public createPropertyAmazon(array $data):PropertyAmazon

Creates one or multiple property amazon

Parameters
array $data The request data
public updatePropertyAmazon(array $data):PropertyAmazon

Updates one or multiple property amazon.

Parameters
array $data
public deletePropertyAmazon(int $propertyAmazonId):void

Deletes a property amazon. The ID of property amazon must be specified.

Parameters
int $propertyAmazonId
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.

PropertyAvailabilityRepositoryContract

Get, create, update and delete property availability.

Namespace

Plenty\Modules\Property\Contracts

Methods

public getAvailability(int $availabilityId):PropertyAvailability

Gets an availability. The ID of the availability must be specified.

Parameters
int $availabilityId The ID of the availability
public listAvailabilities():array

Lists availabilities

public createAvailability(array $data):PropertyAvailability

Creates an availability

Parameters
array $data The request data
public updateAvailability(int $availabilityId, array $data):PropertyAvailability

Updates an availability. The ID of availability must be specified.

Parameters
int $availabilityId The ID of the availability
array $data The request data
public deleteAvailability(int $availabilityId):array

Deletes an availability. The ID of availability must be specified.

Parameters
int $availabilityId The ID of the availability
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.

PropertyRepositoryContract

This interface allows you to get, create, update and delete properties.

Namespace

Plenty\Modules\Property\Contracts

Methods

public getProperty(int $propertyId, array $with = []):Property

Gets a property. The ID of the property must be specified.

Parameters
int $propertyId The id of the property
array $with The relations available are:
  1. availibilities
  2. relation
  3. selections
  4. names
  5. options
  6. markets
  7. groups
public listProperties(int $page = 1, int $itemsPerPage = 50, array $with = [], array $filters = [], int $paginate = 1, array $orderBy = []):array

Lists properties

Parameters
int $page The page to get. The default page that will be returned is page 1. See also $paginate.
int $itemsPerPage The number of properties to be displayed per page. The default number of properties per page is 50. See also $paginate.
array $with The relations available are:
  1. availibilities
  2. relation
  3. selections
  4. names
  5. options
  6. markets
  7. groups
array $filters The following filters are available:
  1. id
  2. cast
  3. position
  4. name
  5. lang
  6. group
int $paginate Defines whether or not the result will be a paginated result or a list with all results. If 1 is given for the parameter, the result will be paginated.
array $orderBy The order after which the result is sorted
public createProperty(array $data):Property

Creates a property

Parameters
array $data The request data
public updateProperty(int $propertyId, array $data):Property

Updates a property. The ID of property must be specified.

Parameters
int $propertyId
array $data
public deleteProperty(int $propertyId):void

Deletes a property. The ID of property must be specified.

Parameters
int $propertyId
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.

PropertyRelationValueRepositoryContract

This interface allows you to get, create, update and delete property relation values.

Namespace

Plenty\Modules\Property\Contracts

Methods

public getPropertyRelationValue(int $propertyRelationValueId):PropertyRelationValue

Gets an property relation value. The ID of the property relation value must be specified.

Parameters
int $propertyRelationValueId
public listPropertyRelationValues():array

List property relation values

public createPropertyRelationValue(array $data):PropertyRelationValue

Creates an property relation value

Parameters
array $data The request data
public updatePropertyRelationValue(int $propertyRelationValueId, array $data):PropertyRelationValue

Updates a property relation value. The ID of property relation value must be specified.

Parameters
int $propertyRelationValueId
array $data
public updatePropertyRelationValues(array $data):PropertyRelationValue

Update multiple property relation values

Parameters
array $data
public deletePropertyRelationValue(int $propertyRelationValueId):void

Delete a property relation value

Parameters
int $propertyRelationValueId
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.

PropertyOptionRepositoryContract

This interface allows you to get, list, create, update and delete property options.

Namespace

Plenty\Modules\Property\Contracts

Methods

public getPropertyOption(int $propertyOptionId):PropertyOption

Gets a property option. The ID of the property option must be specified.

Parameters
int $propertyOptionId
public listPropertyOptions():array

List property options

public createPropertyOption(array $data):PropertyOption

Creates a property option

Parameters
array $data The request data
public updatePropertyOption(int $propertyOptionId, array $data):PropertyOption

Updates a property option. The ID of property option must be specified.

Parameters
int $propertyOptionId
array $data
public deletePropertyOption(int $propertyOptionId):array

Deletes a property option. The ID of property option must be specified.

Parameters
int $propertyOptionId
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.

PropertyNameRepositoryContract

This interface allows you to get, list, create, update and delete property names.

Namespace

Plenty\Modules\Property\Contracts

Methods

public getName(int $nameId):PropertyName

Gets a property name. The ID of the property name must be specified.

Parameters
int $nameId The ID of the name
public listNames(array $filters = []):array

Lists property names

Parameters
array $filters
public createName(array $data):PropertyName

Creates a property name

Parameters
array $data The request data
public updateName(int $nameId, array $data):PropertyName

Updates a property name. The ID of property name must be specified.

Parameters
int $nameId The ID of the name
array $data
public deleteName(int $nameId):array

Deletes a property name. The ID of property name must be specified.

Parameters
int $nameId The ID of the name
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.

PropertyMarketRepositoryContract

This interface allows you to get, list, create, update and delete property markets.

Namespace

Plenty\Modules\Property\Contracts

Methods

public getPropertyMarket(int $propertyMarketId):PropertyMarket

Gets a property market. The ID of the property market must be specified.

Parameters
int $propertyMarketId The ID of the property market
public listPropertyMarkets():array

Lists property markets

public createPropertyMarket(array $data):PropertyMarket

Creates a property market

Parameters
array $data The request data
public updatePropertyMarket(int $propertyMarketId, array $data):PropertyMarket

Updates a property market. The ID of property market must be specified.

Parameters
int $propertyMarketId The ID of the property market
array $data The request data
public deletePropertyMarket(int $propertyMarketId):array

Deletes a property market. The ID of property market must be specified.

Parameters
int $propertyMarketId The ID of the property market
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.

PropertySelectionRepositoryContract

This interface allows you to get, create, update and delete property selections.

Namespace

Plenty\Modules\Property\Contracts

Methods

public getPropertySelection(int $propertySelectionId):PropertySelection

Gets a property selection. The ID of the property selection must be specified.

Parameters
int $propertySelectionId
public listPropertySelections(int $page = 1, int $itemsPerPage = 50, array $with = [], array $filters = []):array

List property selections

Parameters
int $page The page to get. The default page that will be returned is page 1. See also $paginate.
int $itemsPerPage The number of property selections to be displayed per page. The default number of selections per page is 50. See also $paginate.
array $with The relations available are:
  1. property
  2. relation
array $filters The filter available is:
  1. porpertyId
public createPropertySelection(array $data):PropertySelection

Creates a property selection

Parameters
array $data The request data
public updatePropertySelection(int $propertySelectionId, array $data):PropertySelection

Updates a property selection. The ID of property selection must be specified.

Parameters
int $propertySelectionId
array $data
public deletePropertySelection(int $propertySelectionId):void

Deletes a property selection. The ID of property selection must be specified.

Parameters
int $propertySelectionId
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.

Models

PropertySelection

The property selection model.

Namespace

Plenty\Modules\Property\Models

Properties

Type Name Description
int id The ID of the property selection
int propertyId The ID of the property
int position The position of the property selection
createdAt The date when the property selection was created
updatedAt The date when the property selection was last updated
PropertyRelation relation

Methods

public toArray()

Returns this model as an array.

PropertyGroupOption

The property group option model.

Namespace

Plenty\Modules\Property\Models

Properties

Type Name Description
int id The ID of the property group option
int propertyGroupId The ID of the property group
string groupOptionIdentifier The identifier of the property group option
string value The value of the property group option
createdAt The date when the property group option was created
updatedAt The date when the property group option was last updated

Methods

public toArray()

Returns this model as an array.

PropertyGroupName

The property group name model. A property group can have several names. One name per language. Each name has a unique ID.

Namespace

Plenty\Modules\Property\Models

Properties

Type Name Description
int id The ID of the property group name
int propertyGroupId The ID of the property group
string lang The language of the property group name as ISO 639-1 language code, e.g. en for English
string name The name of the property group
string description The description of the property group
createdAt The date when the property group name was created
updatedAt The date when the property group name was last updated

Methods

public toArray()

Returns this model as an array.

PropertyAmazon

The property amazon model.

Namespace

Plenty\Modules\Property\Models

Properties

Type Name Description
int id The ID of the property amazon
int propertyId The ID of the property
string platform The platform of the property amazon
string category The category of the property amazon
string field The field of the property amazon
createdAt The date when the property name was created
updatedAt The date when the property name was last updated
Property propertyRelation

Methods

public toArray()

Returns this model as an array.

PropertyGroupRelation

The property group relation model. The model shows which property is related to which property group.

Namespace

Plenty\Modules\Property\Models

Properties

Type Name Description
int propertyId The ID of the property
int propertyGroupId The ID of the property group

Methods

public toArray()

Returns this model as an array.

PropertyRelationValue

The property relation value model.

Namespace

Plenty\Modules\Property\Models

Properties

Type Name Description
int id The ID of the property relation value
int propertyRelationId The ID of the property relation
string lang The language of the property relation value
string value The value of the property relation
string description The description of the property relation value
createdAt The date when the property relation value was created
updatedAt The date when the property relation value was last updated

Methods

public toArray()

Returns this model as an array.

PropertyMarket

The property market model.

Namespace

Plenty\Modules\Property\Models

Properties

Type Name Description
int id The ID of the property market
int propertyId The ID of the property
float referrerId The ID of the referrer
int referrerSubId The ID of the sub referrer
string value The value of the property market
createdAt The date when the property market was created
updatedAt The date when the property market was last updated

Methods

public toArray()

Returns this model as an array.

PropertyOptionValue

The property option value model.

Namespace

Plenty\Modules\Property\Models

Properties

Type Name Description
int id The ID of the property option value
int optionId The ID of the property option
string value The value of the property option
createdAt The date when the property option value was created
updatedAt The date when the property option value was last updated

Methods

public toArray()

Returns this model as an array.

Property

The property model. Properties allow to further describe items, categories etc. A property can have one name per language. The property names have an own model.

Namespace

Plenty\Modules\Property\Models

Properties

Type Name Description
int id The ID of the property
string cast The cast of the property (array values: 'empty','int','float','selection','shortText','longText','date','file')
int position The position of the property
createdAt The date when the property was created
updatedAt The date when the property was last updated
Collection names
Collection options
Collection relation

Methods

public toArray()

Returns this model as an array.

PropertyRelationMarkup

The property relation markup model.

Namespace

Plenty\Modules\Property\Models

Properties

Type Name Description
int id The ID of the property relation markup
int propertyRelationId The ID of the property relation
int variationSalesPriceId The variation sales price id of the property relation markup
float markup The markup of the property relation markup
createdAt The date when the property was created
updatedAt The date when the property was last updated

Methods

public toArray()

Returns this model as an array.

PropertyName

The property name model. A property can have several names. One name per language. Each name has a unique ID.

Namespace

Plenty\Modules\Property\Models

Properties

Type Name Description
int id The ID of the property name
int propertyId The ID of the property
string lang The language of the property name as ISO 639-1 language code, e.g. en for English
string name The name of the property
string description The description of the property
createdAt The date when the property name was created
updatedAt The date when the property name was last updated
Property propertyRelation

Methods

public toArray()

Returns this model as an array.

PropertyRelation

The property relation model allows to relate a property e.g. to a variation or other targets.

Namespace

Plenty\Modules\Property\Models

Properties

Type Name Description
int id The ID of the property relation
int propertyId The ID of the property
string relationTypeIdentifier The identifier of the property relation
int relationTargetId The ID of the target of the relation
int selectionRelationId The ID of the selection relation
createdAt The date when the property was created
updatedAt The date when the property was last updated
Collection relationValues
Property propertyRelation

Methods

public toArray()

Returns this model as an array.

PropertyGroup

The property group model. A property group allows to group several properties together and helps to structure properties. Property groups can have different names per language. The property group names have an own model.

Namespace

Plenty\Modules\Property\Models

Properties

Type Name Description
int id The ID of the property group
int position The position of the property group
createdAt The date when the property group was created
updatedAt The date when the property group was last updated

Methods

public toArray()

Returns this model as an array.

PropertyAvailability

The property availability model.

Namespace

Plenty\Modules\Property\Models

Properties

Type Name Description
int id The ID of the property availability
int propertyId The ID of the property
string type The type of the property availability
float value The value of the property availability
createdAt The date when the property availability was created
updatedAt The date when the property availability was last updated

Methods

public toArray()

Returns this model as an array.

PropertyOption

The property option model. Property options allow to add further specification to a property. Each property option can have several values. The porperty option values have an own model.

Namespace

Plenty\Modules\Property\Models

Properties

Type Name Description
int id The ID of the property option
int propertyId The ID of the property
string typeOptionIdentifier The identifier of the type option
createdAt The date when the property option was created
updatedAt The date when the property option was last updated
Collection propertyOptionValues

Methods

public toArray()

Returns this model as an array.