Files
safekat/ci4/app/Entities/Configuracion/Imposicion.php
2025-04-12 23:53:48 +02:00

32 lines
791 B
PHP
Executable File

<?php
namespace App\Entities\Configuracion;
use CodeIgniter\Entity;
class Imposicion extends \CodeIgniter\Entity\Entity
{
protected $attributes = [
"id" => null,
"ancho" => null,
"alto" => null,
"unidades" => null,
"orientacion" => null,
"maquina" => null,
"etiqueta" => null,
];
protected $casts = [
"ancho" => "int",
"alto" => "int",
"unidades" => "?int",
];
public function getFullName() : string
{
$ancho_x_alto = $this->attributes["ancho"] ."x". $this->attributes["alto"];
$unidades = $this->attributes["unidades"] ?? "";
$orientacion = $this->attributes["orientacion"] ?? "";
return implode("_",[$ancho_x_alto,$unidades,$orientacion]);
}
}