type = strtolower($type); $this->name = strtolower($name); $this->id = strtolower($uid); } else { die("Invalid type given: " . $type . "\n $name $uid"); } // assign relevant icon switch ($this->type) { case "questionnaire": $this->imageURL = "images/icons/questionnaire.png"; break; case "dashboard": $this->imageURL = "images/icons/dashboard.png"; break; case "application": $this->imageURL = "images/icons/application.png"; break; default: $this->imageURL = "images/icons/unknowntype.png"; break; } } public function init() { if (isset($this->type) && isset($this->imageURL) && isset($this->name)) { ?>
name; ?>
id += $offset; } } ?>