Releases: dereuromark/cakephp-templating
0.2.6
Improvements
Backend added
If routes are enabled, you should be able to navigate to
/admin/templating/icons
and see all your custom (mapped) icons, as well as the icons available.
You can also check the full icon sets available (namespaced ones).
It can also show you possible conflicts (same icon in different sets, here the defined order matters).
For conflicting ones you can use aliasing through the map - or directly use the verbose set:name
syntax where the "other one" is needed.
Icon::render()
Aliasing now works by default for all icons that are not conflicting. On conflicts it will use the first one defined in your config.
The order now is as follows:
- map (custom aliasing)
- primary set
- other sets
See the new backend for details.
It also now allows custom title attribute key via titleField
in options, and uses BC title
option from previous icon helper functionality (with deprecation note). You should be using arguments (3rd param) for title
.
0.2.5
0.2.4
0.2.3
Improvements
FontAwesome v6 icons can now be read from different types of files.
JSON type has the greatest advantage of also providing aliases by default.
They are now also only pulled for the type (solid, regular, ...) configured.
0.2.2
Improvements
Add Templating helper with
- warning()
- ok()
convenience methods to color the text according to a boolean result/value
0.2.1
Improvements
Added `HtmlHelper::string() convenience method:
The Html helper can now directly be used to create Html value objects
$html = $this->Html->string('<i>text</i>');
$this->Html->link($html, '/my/url');
0.2.0
Improvements
API changes
Moved value object Html and the trait HtmlStringable one level up:
-use Templating\View\Html\Html;
-use Templating\View\Html\HtmlStringable;
+use Templating\View\Html;
+use Templating\View\HtmlStringable;
Renamed helper traits
-use Templating\View\Helper\HtmlTrait;
-use Templating\View\Helper\FormTrait;
+use Templating\View\Helper\HtmlHelperTrait;
+use Templating\View\Helper\FormHelperTrait;
Added serialization support
The value objects should be safe for serialization using PHP native serialize()
as well as
json_encode()
. As such they should work fine with caching and other forms of transportation
(e.g. API) through different layers.
0.1.2
Improvements
Added Html value object as convenience wrapper in general:
use Templating\View\Html\Html;
$html = Html::create('<i>text</i>');
$this->Html->link($html, '/my/url');
0.1.1
Fixes
Use strict_types enabled to make the API more clean.