method updateWidget documentation in bbn\Appui\Dashboard

Updates a widget (Bit)

function(string $id, array $widget) { if (!Str::isUid($id)) { throw new \Exception(_("The id must be a uuid")); } if (!($opt = $this->getWidgetOption($id, true))) { throw new \Exception(sprintf(_("No option found with this id %s"), $id)); } $d1 = $this->pref->getBitCfg(null, $this->_prepareWidget($widget)); $d2 = $this->pref->getBitCfg(null, $this->_prepareWidget($opt)); $toSave = \array_filter( $d1, function ($v, $k) use ($d2) { return $d2[$k] != $v; }, ARRAY_FILTER_USE_BOTH ); $toSave[$this->archBits['text']] = $widget[$this->archBits['text']]; return (bool)$this->pref->updateBit($id, $toSave); }

Updates a widget (Bit) 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.