nur-sery/nur_src/v/bs3/fo/ControlReset.php

36 lines
824 B
PHP

<?php
namespace nur\v\bs3\fo;
use nur\b\params\Tparametrable;
use nur\v\v;
class ControlReset extends ControlVisual {
use Tparametrable;
const AUTOID = false;
const PARAMETRABLE_PARAMS_SCHEMA = [
"reset" => ["?content", null, "libellé du bouton"],
"class" => ["?array", "btn-default"],
#XXX ajouter type pour contrôler le type de bouton (default, primary, etc.)
];
/** @var array|string */
protected $ppReset;
function getControl(): array {
$control = v::tag("button", [
"type" => "reset",
"name" => $this->ppName,
"value" => $this->ppValue,
"class" => ["btn", $this->ppClass],
"style" => $this->ppStyle,
$this->ppAttrs,
q($this->ppReset),
]);
if ($this->ppNaked) return $control;
return $this->getFgsLayout($control, true);
}
}