Feature #41706
Provide standard library with configurable usage
Status: | Resolved | Start date: | 2012-10-08 | |
---|---|---|---|---|
Priority: | Should have | Due date: | ||
Assigned To: | Christopher Hlubek | % Done: | 100% |
|
Category: | - | |||
Target version: | - |
Description
Eel should include a standard library with the most basic functions for Date, String and Array.
Suggestion:
Date.now().format("d.m.Y")
String.strftime("%d.%m.%Y", Date.now())
Array.join(Array.reverse(items), ' - ')
Array.count([1, 2, 3])
Eel should still be usable with an empty Context for total flexibility.
Related issues
Associated revisions
[FEATURE] Implement String, Date and Array helper for Eel
This change implements String, Date and Array functions for the Eel
standard library. The helpers have to be explicitly added to an Eel
context to be available inside Eel expressions.
Change-Id: I8d786f7d295780904215d79fa7d64a8528490222
Related: #41706
Reviewed-on: https://review.typo3.org/21824
Reviewed-by: Christian Mueller
Tested-by: Christian Mueller
[FEATURE] Extend standard library helpers
- Added MathHelper with round function
- Added ArrayHelper functions:
sort, random, shuffle, pop, push, shift, unshift, splice
- Added md5 function to StringHelper
Resolves: #41706
Releases: master
Change-Id: I90ef3c57f94759613d089ca40c88fa2300c99404
Reviewed-on: https://review.typo3.org/24241
Reviewed-by: Sebastian Kurfuerst
Tested-by: Sebastian Kurfuerst
History
#1 Updated by Christopher Hlubek about 2 years ago
Eel Core
StringHelper:
- Based on https://developer.mozilla.org/en-US/docs/Web/JavaScript/Reference/Global_Objects/String/prototype#Methods
- Implement additional methods that are missing in JS
- decide for overlapping functionality
DateHelper:
ArrayHelper:
MathHelper:
Flow
ResourceHelper:
- Access to static and persisted resources
I18nHelper:
- I18N translations and formatting
UriHelper:
- Access to building URIs via Eel
Neos
FormatHelper:
- Crop
NodeHelper:
- Build URIs to Nodes
#2 Updated by Christopher Hlubek about 2 years ago
- Status changed from New to Accepted
- % Done changed from 0 to 30
#3 Updated by Christopher Hlubek about 2 years ago
- % Done changed from 30 to 80
This issue needs only a MathHelper to be resolved, the other helpers are tracked by #41859.
#4 Updated by Gerrit Code Review almost 2 years ago
- Status changed from Accepted to Under Review
Patch set 1 for branch master has been pushed to the review server.
It is available at https://review.typo3.org/24241
#5 Updated by Gerrit Code Review almost 2 years ago
Patch set 2 for branch master has been pushed to the review server.
It is available at https://review.typo3.org/24241
#6 Updated by Gerrit Code Review almost 2 years ago
Patch set 3 for branch master has been pushed to the review server.
It is available at https://review.typo3.org/24241
#7 Updated by Gerrit Code Review almost 2 years ago
Patch set 4 for branch master has been pushed to the review server.
It is available at https://review.typo3.org/24241
#8 Updated by Gerrit Code Review almost 2 years ago
Patch set 5 for branch master has been pushed to the review server.
It is available at https://review.typo3.org/24241
#9 Updated by Gerrit Code Review over 1 year ago
Patch set 6 for branch master of project Packages/TYPO3.Eel has been pushed to the review server.
It is available at https://review.typo3.org/24241
#10 Updated by Oliver Eglseder over 1 year ago
- Status changed from Under Review to Resolved
- % Done changed from 80 to 100
Applied in changeset cd57463e9c8bb88ee8fd6e96c39048ce7f8918bd.