/** * gets lightbulb form * @return string HTML div */ public static function getLightGroupForm() { self::processAddLight(); //get all lightbulbs from db and create button for each $lightArray = self::getAllGroupIds(); $form = "<div><h2>Light Groups</h2>"; foreach ($lightArray as $groupId) { $light = new LightGroup($groupId); $button = $light->getButtonDiv(); $form .= "<div>{$button}</div>"; //$light->activateLight(); } $form .= "</div>" . self::getAddLightDiv(); return $form; }