1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 18 19 20 21 22 23 24 25 26 27 28 29 30 31 32 33 34 35 36 37 38 39 40 41 42 43 44 45 46 47
|
class autoFormConverrt {
protected $equivalent = [];
protected $libelle = [];
protected $exclude = [];
protected $required = [];
protected $optional = [];
public function __construct() {
$this->exclude['kot_stay']['facturation_type'] = true;
$this->exclude['kot_stay']['facturation_number'] = true;
$this->optional['kot_stay']['facturation_type'] = true;
$this->optional['kot_stay']['facturation_number'] = true;
}
}
class autoform extends autoFormConverrt {
const SCHEMA = 'develop';
static $_compteur = 0;
public function __construct($action = null, $id = null, $method = null, $return = null) {
self::$_compteur++;
parent::__construct(); // building array for field's name correspondences
}
public function makeInput() {
if (count($this->required[$this->_table]) > 0) {
$required = '';
} else {
$required = ' required';
}
var_dump($this->libelle); // <=========== là ça m'affiche un tableau vide alors qu'il reçoit des entrées dans la classe parente
br();
if (isset($this->optional[$this->_table][$name])) { // <========= du coup je ne passe pas ici alors que cela devrait
$required = '';
}
}
} |
Partager