public static function options_elements()
 {
     $teccc = Main::instance();
     $content = $teccc->view('optionsform', array('options' => self::fetch_options($teccc), 'teccc' => $teccc), false);
     return $content;
 }
 /**
  * Displays legend.
  *
  * @param string $existingContent
  * @return bool
  */
 public function show_legend($existingContent = '')
 {
     $tribe = Tribe__Events__Main::instance();
     $eventDisplays = array('month');
     $eventDisplays = array_merge($eventDisplays, $this->legendExtraView);
     $tribe_view = get_query_var('eventDisplay');
     if (isset($tribe->displaying) && get_query_var('eventDisplay') !== $tribe->displaying) {
         $tribe_view = $tribe->displaying;
     }
     if ('tribe_events' === get_query_var('post_type') && !in_array($tribe_view, $eventDisplays, true)) {
         return false;
     }
     if (!(isset($this->options['add_legend']) && '1' === $this->options['add_legend'])) {
         return false;
     }
     $content = $this->teccc->view('legend', array('options' => $this->options, 'teccc' => Main::instance(), 'tec' => Tribe__Events__Main::instance()), false);
     $this->legendFilterHasRun = true;
     echo $existingContent . apply_filters('teccc_legend_html', $content);
 }
<?php

namespace Fragen\Category_Colors;

use Tribe__Events__Main;
$teccc = Main::instance();
?>
<div id="legend_box" class="teccc-legend">

    <ul id="legend">

        <?php 
foreach ($teccc->terms as $id => $attributes) {
    ?>
            <?php 
    $slug = esc_attr($attributes[Main::SLUG]);
    $name = esc_attr($attributes[Main::NAME]);
    $link = get_term_link($id, Tribe__Events__Main::TAXONOMY);
    ?>
            <li class="tribe-events-category-<?php 
    echo $slug;
    ?>
 tribe-events-category-<?php 
    esc_attr_e($id);
    ?>
">
                <a href="<?php 
    echo $link;
    ?>
">
                    <?php