method insert documentation in bbn\Appui\Imessages

Inserts a new page's internal message

function($imess) { $res = null; $cfg =& $this->class_cfg; // Get default page if it isn't set if (empty($imess['id_option'])) { $perm = new \bbn\User\Permissions(); $imess['id_option'] = $perm->is(self::BBN_DEFAULT_PERM); } if (!empty($imess['id_option']) && !empty($imess['title']) && !empty($imess['content']) && !empty($this->_id_type()) // Insert the new note && ($id_note = $this->notes->insert($imess['title'], $imess['content'], $this->_id_type())) // Insert the new internal message && $this->db->insert( $cfg['table'], [ $cfg['arch']['imessages']['id_note'] => $id_note, $cfg['arch']['imessages']['id_option'] => $imess['id_option'], $cfg['arch']['imessages']['id_user'] => $imess['id_user'] ?: null, $cfg['arch']['imessages']['id_group'] => $imess['id_group'] ?: null, $cfg['arch']['imessages']['start'] => $imess['start'] ?: null, $cfg['arch']['imessages']['end'] => $imess['end'] ?: null ] ) ) { $res = $this->db->lastId(); } return $res; }

Inserts a new page's internal message 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.