method addException documentation in bbn\Appui\Event
Adds an event recurring exception
function(string $id_event, array $exc)
{
if (
Str::isUid($id_event) &&
($ext =& $this->class_cfg['tables']['exceptions']) &&
($exf =& $this->class_cfg['arch']['exceptions']) &&
$this->get($id_event) &&
!empty($exc[$exf['day']]) &&
!empty($exc[$exf['start']]) &&
!empty($exc[$exf['end']]) &&
(
!empty($exc[$exf['deleted']]) ||
!empty($exc[$exf['rescheduled']])
)
){
if ( empty($exc[$exf['id_event']]) ){
$exc[$exf['id_event']] = $id_event;
}
$exc[$exf['day']] = date('Y-m-d', strtotime($exc[$exf['day']]));
$exc[$exf['start']] = date('H:i:s', strtotime($exc[$exf['start']]));
$exc[$exf['end']] = date('H:i:s', strtotime($exc[$exf['end']]));
$exc[$exf['id_user']] = !empty($exc[$exf['id_user']]) ? $exc[$exf['id_user']] : User::getInstance()->getId();
$exc[$exf['creation']] = Str::isDateSql($exc[$exf['creation']]) ?
$exc[$exf['creation']] : date('Y-m-d H:i:s');
return (bool)$this->db->insert($ext, $exc);
}
return false;
}
Adds an event recurring exception 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