Example #1
0
 protected function renderTreeSwitcher($label, $array_key = NULL)
 {
     $tree_id = \Ladybug\Dumper::getTreeId();
     $result = '<label for="tree_' . $this->type . '_' . $tree_id . '">';
     $result .= $this->renderArrayKey($array_key);
     $result .= '<span class="switcher">' . $label . '</span>';
     $result .= '</label>';
     $result .= '<input type="checkbox" id="tree_' . $this->type . '_' . $tree_id . '"';
     if ($this->options->getOption('general.expanded')) {
         $result .= ' checked';
     }
     $result .= ' />';
     return $result;
 }