method get documentation in bbn\Appui\Cms

Returns the note from its id, with its URL, start and end date of publication.

function(string $id_note, bool $with_medias = false, bool $with_content = true) { $cacheName = md5(json_encode(func_get_args())); if ($res = $this->cacheGet($id_note, $cacheName)) { return $res; } $res = []; if (!empty($id_note) && ($note = $this->note->get($id_note))) { $res = $note; $res['url'] = $this->note->getUrl($id_note); $res['start'] = $this->getStart($id_note); $res['end'] = $this->getEnd($id_note); $res['tags'] = $this->note->getTags($id_note); $res['items'] = $note['content'] ? json_decode($note['content'], true) : []; if (($res['id_media'] = $this->getDefaultMedia($id_note)) && !$with_medias) { $res['media'] = $this->getMedia($res['id_media']); } if (!$with_content) { unset($res['content']); } if ($with_medias) { $res['medias'] = $this->note->getMedias($id_note); } } $this->cacheSet($id_note, $cacheName, $res); return $res; }

Returns the note from its id, with its URL, start and end date of publication. 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.