}
$specValue = ' - ';
- if ($specEntity->type == 'numeric' || $specEntity->type == 'numeric_list') {
+ if ($specEntity->type === 'numeric' || $specEntity->type === 'numeric_list') {
$specValue = $specEntity->prefix;
- if ($specEntity->type == 'numeric_list' && is_array($val)) {
+ if ($specEntity->type === 'numeric_list' && is_array($val)) {
$specValue .= ' ' . implode(' ' . $specEntity->separator . ' ', $val);
} else {
if (is_array($val)) {
$specValue = $val;
}
$specValue .= ' ' . $specEntity->unit;
- } else if ($specEntity->type == 'text') {
+ } else if ($specEntity->type === 'text') {
$specValue = trim($val);
- } else if ($specEntity->type == 'range') {
+ } else if ($specEntity->type === 'range') {
if (!isset($val['first']) || !isset($val['second']) || (!$val['first'] && !$val['second'])) {
continue;
}
$specValue = $val['first'] . ' ' . __('à') . ' ' . $val['second'] . ' ' . $specEntity->unit;
- } else if ($specEntity->type == 'list') {
+ } else if ($specEntity->type === 'list') {
if (is_array($val)) {
continue;
}
namespace App\Models;
-use Cubist\Backpack\app\Magic\Models\CubistMagicAbstractModel;
+use Cubist\Backpack\app\Magic\Models\CubistMagicTranslatableModel;
-class Specification extends CubistMagicAbstractModel
+class Specification extends CubistMagicTranslatableModel
{
protected $table = 'catalog_specifications';