/** * Gets our place (or places), complete as RTE'ed HTML with address and * links. Returns a localized string "will be announced" if the seminar has * no places set. * * @param tx_oelib_templatehelper $plugin the current FE plugin * * @return string our places description (or '' if there is an error) */ public function getPlaceWithDetails(tx_oelib_templatehelper $plugin) { if (!$this->hasPlace()) { $plugin->setMarker('message_will_be_announced', $this->translate('message_willBeAnnounced')); return $plugin->getSubpart('PLACE_LIST_EMPTY'); } $result = ''; foreach ($this->getPlacesAsArray() as $place) { $name = htmlspecialchars($place['title']); if ($place['homepage'] != '') { $name = $plugin->cObj->getTypoLink($name, $place['homepage'], array(), $plugin->getConfValueString('externalLinkTarget')); } $plugin->setMarker('place_item_title', $name); $descriptionParts = array(); if ($place['address'] != '') { $descriptionParts[] = htmlspecialchars(str_replace(CR, ',', $place['address'])); } if ($place['city'] != '') { $descriptionParts[] = trim(htmlspecialchars($place['zip'] . ' ' . $place['city'])); } if ($place['country'] != '') { $countryName = $this->getCountryNameFromIsoCode($place['country']); if ($countryName != '') { $descriptionParts[] = htmlspecialchars($countryName); } } $description = implode(', ', $descriptionParts); if ($place['directions'] != '') { $description .= $plugin->pi_RTEcssText($place['directions']); } $plugin->setMarker('place_item_description', $description); $result .= $plugin->getSubpart('PLACE_LIST_ITEM'); } $plugin->setMarker('place_list_content', $result); return $plugin->getSubpart('PLACE_LIST_COMPLETE'); }
/** * Creates a link to this speaker's homepage, with the title as link text. * * @param tx_oelib_templatehelper $plugin templatehelper object with current configuration values * * @return string this speaker's title wrapped in an link tag, or if the * speaker has no homepage just the speaker name, will not * be empty */ public function getLinkedTitle(tx_oelib_templatehelper $plugin) { $safeTitle = htmlspecialchars($this->getTitle()); if ($this->hasHomepage()) { $result = $plugin->cObj->getTypoLink($safeTitle, $this->getHomepage(), array(), $plugin->getConfValueString('externalLinkTarget')); } else { $result = $safeTitle; } return $result; }