public function createComponentDetailTabs() { $control = new TabsControl($this->context); $control->subject = $this->template->item; $control->excludePlace = $this->template->item->id; $control->addTab('events', true); $control->addTab('nearEvents'); $control->addTab('nearPlaces'); return $control; }
public function createComponentDetailTabs() { if (!is_null($this->template->item->subject)) { $subject = $this->template->item->subject; $control = new TabsControl($this->context); $control->subject = $subject; $control->excludeEvent = $this->template->item->id; $control->excludePlace = $subject->id; $coords = \soundake\utils\Geolocation::getCoordsFromText($this->template->item->subject_gps); $control->lat = $coords[0]; $control->lon = $coords[1]; $control->addTab('events', true); $control->addTab('nearPlaces'); $control->addTab('nearEvents'); return $control; } return new BaseControl($this->context); }