identifier = rand(1000, 9000); } public function startTab($title, $clickable = true, $attributes = '') { if ($this->opened) { $this->endTab(); } $this->opened = true; $attributes .= $clickable ? '' : 'data-empty="true"'; $classLi = $clickable ? '' : 'tabs-title-empty'; $this->identifier = preg_replace('#[^a-z0-9]#is', '_', strtolower($title)); $this->titles[] = '
  • '.$title.'
  • '; ob_start(); } public function endTab() { if (!$this->opened) { return; } $this->opened = false; $this->content[] = '
    '.ob_get_clean().'
    '; $this->tabNumber++; } public function display($id) { if ($this->opened) { $this->endTab(); } $tabSystem = ''; $tabSystem .= '
    '; $tabSystem .= implode('', $this->content); $tabSystem .= '
    '; echo $tabSystem; } }