assignId(); } $hoverControl->setScriptEvents(true); $tooltipControl->assignId(); $tooltipControl->setVisible(false); $this->tooltips[$hoverControl->getId()] = $tooltipControl->getId(); return $this; } /** * * @see \FML\Script\Sections\Constants::getConstants() */ public function getConstants() { $constant = '['; if (count($this->tooltips) <= 0) { $constant .= '"" => ""'; } else { $index = 0; foreach ($this->tooltips as $hoverId => $tooltipId) { $constant .= '"' . $hoverId . '" => "' . $tooltipId . '"'; if ($index < count($this->tooltips) - 1) { $constant .= ','; } $index++; } } $constant .= ']'; $constants = array(); $constants[self::C_TOOLTIPIDS] = $constant; return $constants; } /** * * @see \FML\Script\Sections\Labels::getLabels() */ public function getLabels() { $labels = array(); $labelMouseOut = file_get_contents(__DIR__ . '/Templates/TooltipMouseOut.txt'); $labels[Labels::MOUSEOUT] = $labelMouseOut; $labelMouseOver = file_get_contents(__DIR__ . '/Templates/TooltipMouseOver.txt'); $labels[Labels::MOUSEOVER] = $labelMouseOver; return $labels; } }