*/
private $linkName = "";
+ /**
+ * Base of the link
+ */
+ private $linkBase = "";
+
/**
* Protected constructor
*
*
* @param $templateInstance An instance of a template engine
* @param $linkName Name of the link we shall generate
+ * @param $linkBase Link base for all generated links
* @return $helperInstance A prepared instance of this helper
*/
- public final static function createWebLinkHelper (CompileableTemplate $templateInstance, $linkName) {
+ public final static function createWebLinkHelper (CompileableTemplate $templateInstance, $linkName, $linkBase) {
// Get new instance
$helperInstance = new WebLinkHelper();
// Set template instance
$helperInstance->setTemplateInstance($templateInstance);
- // Set Link name
+ // Set link name
$helperInstance->setLinkName($linkName);
+ // Set link base
+ $helperInstance->setLinkBase($linkBase);
+
// Return the prepared instance
return $helperInstance;
}
return $this->linkName;
}
+ /**
+ * Setter for link base
+ *
+ * @param $linkBase Base of the link we shall generate
+ * @return void
+ */
+ protected final function setLinkBase ($linkBase) {
+ $this->linkBase = (string) $linkBase;
+ }
+
+ /**
+ * Getter for link base
+ *
+ * @return $linkBase Base of the link we shall generate
+ */
+ public final function getLinkBase () {
+ return $this->linkBase;
+ }
+
/**
* Flush the content out,e g. to a template variable
*