aLinks = $aNewLinks; $this->aLinksText = $aNewLinksText; $this->aLinkImages = $aNewLinkImages; $this->iRows = $iNewRows; $this->iColumns = $iNewColumns; $this->iLinkType = $iNewLinkType; } /** * Build the HTML string used to render the object * * @return String of HTML used to render object */ function & render() { global $default; $iArraySize = count($this->aLinks); $iArrayCount = 0; $sToRender = "\n"; //build the table for ($i = 0; $i < ($this->iRows > $iArraySize ? $this->iRows : $iArraySize); $i++) { $sToRender .= "\n"; $sLink = ""; for ($j = 0; $j < $this->iColumns; $j++) { if ($iArrayCount <= $iArraySize) { if (strlen($this->aLinks[$iArrayCount]) > 0) { $sLink = "aLinks[$iArrayCount] . "\">"; if ($this->iLinkType == TEXT) { $sLink .= $this->aLinksText[$iArrayCount]; } else if ($this->iLinkType == IMAGE) { $oImage = new PatternImage($this->aLinkImages[$iArrayCount]); $sLink .= $oImage->render(); } $sLink .= ""; } $iArrayCount++; } if (strlen($sLink) > 0) { $sToRender .= ""; $sToRender .= "\n"; } } $sToRender .= "\n"; } $sToRender .= "
$sLink
\n"; return $sToRender; } } ?>