Ejemplo n.º 1
0
 /**
  * @return string HTML
  */
 public function getProjectMenu()
 {
     $data = $this->data;
     $projects = Graphite::getProjects();
     return '<select name="project" required class="form-control nagf-select-project">' . '<option value="" disabled>Select project</option>' . implode('', array_map(function ($project) use($data) {
         return '<option' . ($project === $data->project ? ' selected' : '') . '>' . htmlspecialchars($project) . '</option>';
     }, $projects)) . '</select>';
 }