Format Helper
Specific Icons
<?php echo $this->Format->yesNo($boolValue); ?>
<?php echo $this->Format->thumbs($boolValue); ?>
Font Icons
<?php echo $this->Format->fontIcon('motorcycle'); ?>
<?php echo $this->Format->fontIcon('anchor', ['spin' => true]); ?>
Note: Use IdeHelperExtra plugin to get autocomplete for all icons
Bootstrap Icons
<?php echo $this->Format->icon('info-circle-fill', ['iconNamespace' => 'bi']); ?>
Note: Use IdeHelperExtra plugin to get autocomplete for all icons
Other
<?php echo $this->Format->ok('I am OK', 1); ?>
<?php echo $this->Format->ok('Me not so much', 0); ?>
I am OKMe not so much
Array to Table
$array = [
['x' => '0', 'y' => '0.5', 'z' => '0.9'],
['1', '2', '3'],
['4', '5', '6']
];
echo $this->Format->array2table($array);
x | y | z |
---|---|---|
0 | 0.5 | 0.9 |
1 | 2 | 3 |
4 | 5 | 6 |