function getEmpty()
{
global $DB;
//make an empty database object
$table = $this->getTable();
if (!empty($table) && ($fields = $DB->list_fields($table))) {
foreach ($fields as $key => $val) {
$this->fields[$key] = "";
}
} else {
return false;
}
if (array_key_exists('entities_id', $this->fields) && isset($_SESSION["glpiactive_entity"])) {
$this->fields['entities_id'] = $_SESSION["glpiactive_entity"];
}
$this->post_getEmpty();
// Call the plugin hook - $this->fields can be altered
Plugin::doHook("item_empty", $this);
return true;
}