Menu
Introduction
Getting Started
Developer guide
Release
Architecture
CLI
Technical documentations
Version
Publication date

Mar 9, 2022

Confidentiality
Public
Reactions
1
Share

EntityTagList

Aggregate to manage tags of an entity

Functions
__init__

Initialize self. See help(type(self)) for accurate signature.

entity_type : TagEntityType
entity_id : str
tags : list[gws_core.tag.entity_tag.EntityTag] | None
default_origin : gws_core.tag.tag.TagOrigin | None
add_tag
add_tags
build_tags_propagated

Propagate the tags to the entity

origin_type : TagOriginType
origin_id : str
Return type : list
delete_tag
delete_tag_by_key
delete_tags
get_first_tag_by_key

return the first tag with the given key or None if it does not exist

tag_key : str
Return type : gws_core.tag.entity_tag.EntityTag | None
get_propagable_tags
Return type : list
get_tag

return the tag if it exists

tag : Tag
Return type : gws_core.tag.entity_tag.EntityTag | None
get_tag_value

Return the value of the first tag with the given key, or default if not found.

tag_key : str
default : str - ''
Return type : str
get_tags
Return type : list
get_tags_as_dict
Return type : dict
get_tags_by_key

return the tags with the given key

tag_key : str
Return type : list
has_tag

return true if the tag key and value already exist in the model

tag : Tag
Return type : bool
has_tag_key

return true if the tag key already exist in the model

tag_key : str
Return type : bool
is_empty
Return type : bool
replace_tag
replace_tags
support_multiple_origins

Return true if the entity support multiple origins for a tag

Return type : bool
to_dto
Return type : list
delete_by_entity @classmethod
entity_type : TagEntityType
entity_id : str
find_by_entity @classmethod
entity_type : TagEntityType
entity_id : str
default_origin : gws_core.tag.tag.TagOrigin | None
Return type : EntityTagList
Shine Logo
Technical bricks to reuse or customize

Have you developed a brick?

Share it to accelerate projects for the entire community.