Releases: Aplia/swark
Sorted ezobjectrelationlist_content nodes
By their order in the attribute content.
Made ezobjectrelationlist_content always return an array
Potential breaking change, if any code expects to use the node directly, instead of as an array.
Added new operator `ezobjectrelationlist_content`
See documentation for usage.
Fixed typo which cause undefined variable error
v1.2.10 Fixed 'Undefined variable parameterOptions' in SwarkOperator.php
Improved parameter definitions and dump() operator
Parameters may now be defined with array structures.
This allows for better definitions of the default value and can support more definitions in the future.
It is still possible to use the old syntax with only a string.
The following array entries exists:
- name - The name of the parameter, must exist
- default - Default value for parameter if not passed, may be ommitted to make parameter required.
- type - Enforce a type, use
"mixed"
ornull
to allow any value. Type value must matchgettype()
values. If unset and a default value exists it will be set to the default value type
e.g.
function __construct()
{
parent::__construct('dump',
['name' => 'value', 'default' => null]
);
}
Added a new template operator dump()
which replaces the builtin one.
This will use Symfony var dumper (if available) to dump the contents and place it in the template output.
Require required parameters
- Fixes a bug where required parameters weren't actually required.
- Fixes null check for json encode operator
Minor bugfix
Update SwarkJSONEncodeOperator.php to add a default value missing '=' in parameter declaration causing it to be missing a 'default' property, leading to a Undefined index error.
Improved `redirect` operator to support more url types
A new parameter type
can be used to control how the resulting URL is generated.
It can contain one of
abs
- Generates an absolute url, with path-prefix/siteaccessroot
- Generates a relative url without path-prefix/siteaccessabsroot
- Generates an absolute url, without path-prefix/siteaccess
Additionally improvements:
- Url starting with double slashes, ie. url without a scheme are supported.
- Improved https detection, now works if behind a proxy.
For instance to ensure that an absolute url is returned:
{redirect("/about", 302, "abs")}
{redirect("https://example.org", 302, "abs")}
Enforced linefeed for all files
Added .gitattributes which defines that all files should use LF as EOL
Added documentation for ezselection_content as restructured text
Added documentation for ezselection_content as restructured text.