namespace Fluidbook\Tools\Links;
-class ShowLinkLink extends NormalLink
-{
- public function getURL()
- {
+class ShowLinkLink extends NormalLink {
+
+ public function init() {
+ $this->close_button = $this->close_button ?: $this->video_service;
+ }
+
+ public function getURL() {
return '#';
}
- public function getClasses()
- {
+ public function getClasses() {
$res = parent::getClasses();
$res[] = 'showlink';
return $res;
}
- public function getAdditionnalContent()
- {
+ public function getAdditionnalContent() {
$res = parent::getAdditionnalContent();
- if (!$this->video_service) {
- $this->video_service = 'none';
- }
- $res .= ' data-showmode="' . $this->target . '" data-showclose="' . $this->video_service . '" data-showid="' . $this->to . '"';
+ $this->close_button = $this->close_button ?: 'none';
+ $res .= ' data-showmode="' . $this->target . '" data-showclose="' . $this->close_button . '" data-showid="' . $this->to . '"';
return $res;
}
}