add theme
This commit is contained in:
@@ -0,0 +1,40 @@
|
||||
<?php
|
||||
|
||||
namespace Helpers;
|
||||
|
||||
class StringFormatter
|
||||
{
|
||||
public static function productTitle()
|
||||
{
|
||||
return function ($template, $context, $args, $source) {
|
||||
$productTitle = $context->get($args);
|
||||
$parts = explode("(", $productTitle);
|
||||
|
||||
return trim($parts[0]);
|
||||
};
|
||||
}
|
||||
|
||||
public static function adminOrderLabel()
|
||||
{
|
||||
return function ($template, $context, $args, $source) {
|
||||
$label = $context->get($args);
|
||||
if (substr($label, 0, 21) === "Select if this person") {
|
||||
return "Caretaker is authorized";
|
||||
}
|
||||
|
||||
if ($label === "SESSpromoid") {
|
||||
return "Promotion ID";
|
||||
}
|
||||
|
||||
if ($label === "SESSpromotion_description") {
|
||||
return "Promotion Description";
|
||||
}
|
||||
|
||||
if ($label === "SESScoupon_code") {
|
||||
return "Coupon Code";
|
||||
}
|
||||
|
||||
return $label;
|
||||
};
|
||||
}
|
||||
}
|
||||
Reference in New Issue
Block a user