method get documentation in bbn\Appui\Note
function(string $id, int $version = NULL, bool $simple = false)
{
$cf = &$this->class_cfg;
if (!\is_int($version)) {
$version = $this->latest($id) ?: 1;
}
if ($res = $this->db->rselect(
$cf['tables']['notes'],
[],
[
$cf['arch']['notes']['id'] => $id,
]
)) {
if ($tmp = $this->db->rselect(
$cf['tables']['versions'],
[],
[
$cf['arch']['versions']['id_note'] => $id,
$cf['arch']['versions']['version'] => $version,
]
)) {
$res = array_merge($res, $tmp);
}
if ($simple) {
unset($res[$cf['arch']['versions']['content']]);
}
else {
if ($medias = $this->db->getColumnValues(
$cf['tables']['notes_medias'],
$cf['arch']['notes_medias']['id_media'],
[
$cf['arch']['notes_medias']['id_note'] => $id
]
)) {
$media = $this->getMediaInstance();
$res['medias'] = [];
foreach ($medias as $m) {
$res['medias'][] = $media->getMedia($m, true);
}
}
}
return $res;
}
return null;
}
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-2023
BBN Solutions