method insert documentation in bbn\Entities\AbstractLinkType
function(array $cfg)
{
$f = $this->fields;
if (($cfg = $this->input($cfg)) && (isset($cfg[$f['id_people']]) || isset($cfg[$f['id_address']]))) {
$param = [];
foreach ($cfg as $k => $v){
if (!in_array($k, $this->fields)) {
$param[$k] = $v;
unset($cfg[$k]);
}
}
if (!empty($param)) {
$cfg[$f['cfg']] = json_encode($param);
}
$cfg[$f['id_entity']] = $this->entity->getId();
$cfg[$f['link_type']] = $this->type;
if (\array_key_exists($f['id'], $cfg)) {
unset($cfg[$f['id']]);
}
if ($this->db->insert($this->class_table, $cfg)) {
return $this->output($this->db->lastId());
}
$this->error("Insert", false);
return false;
}
$this->error("Insert");
return false;
}
BBN is a suite of PHP and JS libraries and VueJS components - all open-source! bbn.io, build applications, the quick way
This website uses cookies to ensure you get the best experience on our website.
© 2011-2025
BBN Solutions