Skip to content

Commit

Permalink
feat(helper/uuid): generate uuid from value (#1064)
Browse files Browse the repository at this point in the history
  • Loading branch information
Davidmattei authored Nov 5, 2024
1 parent f7d63f6 commit 77280c4
Showing 1 changed file with 11 additions and 1 deletion.
12 changes: 11 additions & 1 deletion dev/common-bundle/twig.md
Original file line number Diff line number Diff line change
Expand Up @@ -24,6 +24,7 @@
* [ems_file_from_archive](#ems_file_from_archive)
* [ems_link](#ems_link)
* [ems_valid_mail](#ems_valid_mail)
* [ems_uuid](#ems_uuid-1)
<!-- TOC -->

# Twig Functions
Expand Down Expand Up @@ -97,7 +98,7 @@ Where _'4ef5796bb14ce4b711737dc44aa20bff82193cf5'_ is the hash of a jpg
Generate a version 4 (random) UUID. [More info](https://uuid.ramsey.dev/en/stable/rfc4122/version4.html).

````twig
{{ ems_uuid() }} {# displays: 21.16 KB #}
{{ ems_uuid() }}
````

## ems_store_read
Expand Down Expand Up @@ -398,3 +399,12 @@ Returns true if the input is a valid email
{%- if _source.email|ems_valid_mail -%}{% endif %}
```

## ems_uuid

Generate a version 5 UUID from a value. [More info](https://uuid.ramsey.dev/en/stable/rfc4122/version5.html).

```twig
{{ 'my_unique_id_value'|ems_uuid }}
```


0 comments on commit 77280c4

Please sign in to comment.