The TagAvailabilityRepositoryContract is the interface for the tag availability repository. This interface allows to update and create tag availabilities.
Plenty\Modules\Tag\Contracts
public update(array $data, int $tagId, string $availabilityType):TagAvailability
array | $data | The availability data. The properties that are required to update an tag can be found in the TagAvailability model. |
int | $tagId | The ID of the tag |
string | $availabilityType | The type of the availability. The following types are available.
|
public create(array $data):TagAvailability
array | $data | The availability data. The properties that are required to update an tag can be found in the TagAvailability model. |
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.
The TagNameRepositoryContract is the interface for the tag name repository. This interface allows to update, create and list tag names.
Plenty\Modules\Tag\Contracts
public update(array $data, int $tagId, string $lang):TagName
array | $data | The name data. The properties that are required to update an name can be found in the TagName model. |
int | $tagId | The ID of the tag |
string | $lang | The language of the name |
public create(array $data):TagName
array | $data | The name data. The properties that are required to update an name can be found in the TagName model. |
public findByName(string $name, string $lang):array
string | $name | The name of the tag |
string | $lang | The language 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.
The TagRelationshipRepositoryContract is the interface for the tag relationship repository. This interface allows to update, create, delete and list tag relationships.
Plenty\Modules\Tag\Contracts
public update(array $data, int $tagId, string $availabilityType, int $relationshipValue):TagRelationship
array | $data | The relationship data. The properties that are required to update a relationship can be found in the TagRelationship model. |
int | $tagId | The ID of the tag |
string | $availabilityType | The type of the availability. The following types are available:
|
int | $relationshipValue | The value of the relationship. This value is the ID of the data set the tag is linked to, e.g. item ID 1234. |
public create(array $data):TagRelationship
array | $data | The relationship data. The properties that are required to update a relationship can be found in the TagRelationship model. |
public deleteRelation(int $relationshipValue, int $tagId):void
int | $relationshipValue | The value of the relationship. This value is the ID of the data set the tag is linked to, e.g. item ID 1234. |
int | $tagId | The ID of the tag |
public deleteOneRelation(int $relationshipValue, string $relationshipType, int $tagId):void
int | $relationshipValue | The value of the relationship. This value is the ID of the data set the tag is linked to, e.g. item ID 1234. |
string | $relationshipType | The type of the relationship, i.e. category, item or ticket |
int | $tagId | The ID of the tag |
public deleteOneRelationByUUID(string $relationshipUUID, string $relationshipType, int $tagId):int
Delete a tag relationship by the uuid5 value.
string | $relationshipUUID | The uuid5 value of the relationship. |
string | $relationshipType | The type of the relationship, i.e. board |
int | $tagId | The ID of the tag |
public findByValueId(int $valueId):array
int | $valueId | The value of the relationship. This value is the ID of the data set the tag is linked to, e.g. item ID 1234. |
public findByTagId(int $tagId):array
int | $tagId | The ID of the tag |
public findRelationship(int $tagId, int $relationshipValue, string $relationshipType):TagRelationship
Gets a specific tag relationship or returns null.
int | $tagId | The ID of the tag |
int | $relationshipValue | The value of the relationship |
string | $relationshipType | The type of the relationship |
public delete(int $relationshipValue, string $relationshipType):DeleteResponse
Deletes tag links by reference value and relationship type.
int | $relationshipValue | The value of the relationship |
string | $relationshipType | The type of the relationship |
public deleteByUUID(string $relationshipValue, string $relationshipType):DeleteResponse
Deletes tag links by uuid5 reference value and relationship type.
string | $relationshipValue | The value of the relationship |
string | $relationshipType | The type of the relationship |
public deleteBulk(array $data):Collection
Deletes a list of tag relationships. The tag ID, tag type and relation value must be specified.
array | $data | The array containing the data. |
public listRelationships(array $with = []):Collection
Returns all tag relationships.
array | $with | An array with child instances to be loaded |
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.
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.
The TagRepositoryContract is the interface for the tag repository. This interface allows to create, update and delete tags.
Plenty\Modules\Tag\Contracts
public create(string $name):Tag
Creates a new tag.
string | $name | The name of the tag |
public update(array $data, int $tagId):Tag
Updates a tag.
array | $data | The tag data. The properties that are required to update a tag can be found in the Tag model. |
int | $tagId | The ID of the tag |
public delete(int $tagId):void
Deletes a tag by the given tag ID.
int | $tagId | The ID of the tag |
public getTagByName(string $name):Tag
string | $name | The name of the tag |
public getTagsByIds(array $ids):array
array | $ids | The IDs of the tags |
public getTagById(int $id, array $with = []):Tag
int | $id | The ID of the tag |
array | $with | An array with child instances to be loaded |
public getTagsByAvailability(string $availabilityType):array
string | $availabilityType | The type of the availability. The following types are available.
|
public getTagsByRelationship(string $relationshipType, $value, bool $isUUID = false):array
string | $relationshipType | The relationship type |
$value | The relationship value (string if UUID, otherwise int) | |
bool | $isUUID | Indicates whether the value is a UUID5 or not. |
public listTags(array $with = []):Collection
Returns all tags.
array | $with | An array with child instances to be loaded |
public createTag(array $data):Tag
Creates a new tag.
array | $data | The data as associative array |
public createBulk(array $data):array
Creates up to 50 new tags.
array | $data | The data as associative array |
public updateBulk(array $data):array
Updates up to 50 tags.
array | $data | The data as associative array |
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.
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.
The Tag model
Plenty\Modules\Tag\Models
Type | Name | Description |
---|---|---|
int | id | The tag ID |
string | tagName | The name of the tag |
string | color | The color for the tag |
array | availabilities | The availabilities of the tag. |
array | names | The names of the tag. |
array | relationships | The relationships of the tag. |
array | clients | The clients of the tag. |
string | updatedAt | The updated at timestamp of the tag. |
string | createdAt | The created at timestamp of the tag. |
public toArray()
Returns this model as an array.
The tag availability model.
Plenty\Modules\Tag\Models
Type | Name | Description |
---|---|---|
int | tagId | The Tag ID of the tag |
string | tagType | The type of the tag. The following types are available.
|
public toArray()
Returns this model as an array.
The tag client model.
Plenty\Modules\Tag\Models
Type | Name | Description |
---|---|---|
int | id | The id of the relation |
int | tagId | The Tag ID of the tag |
int | plentyId | The PlentyId of the client |
public toArray()
Returns this model as an array.
The tag name model.
Plenty\Modules\Tag\Models
Type | Name | Description |
---|---|---|
int | id | The name ID of the tag |
int | tagId | The tag ID |
string | tagLang | The lang of the tag name. |
string | tagName | The name of the tag. |
public toArray()
Returns this model as an array.
The tag relationship model.
Plenty\Modules\Tag\Models
Type | Name | Description |
---|---|---|
int | tagId | The ID of the tag |
string | tagType | The type of tag. |
int | relationshipValue | The ID of the data record for which a tag relationship is created |
string | relationshipUUID5 | The ID of the data record for which a tag relationship is created. For models with uuid5 as primary key |
public toArray()
Returns this model as an array.