Hallo,
Missing in the list of functions
number\floor & number\ceil functions
lowerCase & upperCase functions
peter
Missing in the list of functions
number\floor & number\ceil functions
lowerCase & upperCase functions
peter
<?php namespace Espo\Custom\TemplateHelpers; class MyHelper { public static function myHelper() { $args = func_get_args(); $context = $args[count($args) - 1]; $hash = $context['hash']; $data = $context['data']['root']; $value = $args[0] ?? null; // argument $upper = $hash['upper'] ?? '#EA1'; // option upper='VALUE' $entityType = $data['__entityType']; $html = "<span style=\"upper: {$upper};\">" . $value . "</span>"; return new LightnCandy\SafeString( strtoupper ( item) ); } }
<?php
namespace Espo\Custom\TemplateHelpers;
class ToUpper
{
public static function ToUpper()
{
$args = func_get_args();
// $context = $args[count($args) - 1]; // maybe not util this
$value = $args[0] ?? null; // argument
return new LightnCandy\SafeString( strtoupper ( $value ) );
}
}
Comment