Example #1
0
 function setPreset($PresetName)
 {
     $AC = new anyC();
     $AC->setCollectionOf("FhemPreset");
     $AC->addAssocV3("FhemPresetName", "=", $PresetName);
     $P = $AC->getNextEntry();
     $S = new FhemPreset($P->getID());
     $S->activate();
     return true;
 }
Example #2
0
 function getPresetControl(FhemPreset $f)
 {
     $B = new Button("", "./fheME/Fhem/events.png", "icon");
     $B->style("float:left;margin-left:-10px;margin-top:-13px;margin-right:3px;");
     return "<div onclick=\"" . OnEvent::rme($this, "setPreset", $f->getID(), "if(Fhem.doAutoUpdate) Fhem.requestUpdate();") . "\" style=\"cursor:pointer;width:200px;float:left;min-height:15px;border-radius:5px;border-width:1px;border-style:solid;margin:5px;padding:5px;\" class=\"borderColor1\">\n\t\t\t\t{$B}\n\t\t\t\t<div>\n\t\t\t\t\t<b>" . $f->A("FhemPresetName") . "</b>\n\t\t\t\t</div>\n\t\t\t</div>";
 }