/** * getHtml * * @param KVDthes_Match $match * @param boolean $link * * @return string */ public function getHtml(KVDthes_Match $match, $link = true) { $omschrijving .= $match->getMatchable()->getThesaurus()->getNaam(); $omschrijving .= ':' . $match->getMatchable()->getTerm(); $omschrijving = KVDhtml_Tools::out($omschrijving); if (!$link || !isset($this->parameters['url'])) { return $match->getTypeOmschrijving() . ' ' . $omschrijving; } return sprintf('%s <a href="%s">%s</a>', $match->getTypeOmschrijving(), sprintf($this->parameters['url'], $match->getMatchable()->getId()), $omschrijving); }
/** * getHtml * * @param KVDthes_Match $match * @param boolean $link * * @return string */ public function getHtml(KVDthes_Match $match, $link = true) { $omschrijving = $match->getTypeOmschrijving(); $omschrijving .= ' ' . $match->getMatchable()->getThesaurus()->getNaam(); $omschrijving .= ':' . $match->getMatchable()->getTerm(); $omschrijving = KVDhtml_Tools::out($omschrijving); if (!$link || !(isset($this->parameters['url']) || isset($this->parameters['aatnedurl']))) { return $omschrijving; } if (isset($this->parameters['url']) && isset($this->parameters['aatnedurl'])) { $aat = sprintf($this->parameters['url'], $match->getMatchable()->getId()); $aatned = sprintf($this->parameters['aatnedurl'], $match->getMatchable()->getId()); return sprintf('%s (<a href="%s">AAT</a>, <a href="%s">AAT-NED</a>)', $omschrijving, $aat, $aatned); } if (isset($this->parameters['url'])) { $url = $this->parameters['url']; } else { $url = $this->parameters['aatnedurl']; } return sprintf('<a href="%s">%s</a>', $url, $omschrijving); }
public function testOut() { foreach ($this->testData as $input => $output) { $this->assertEquals($output, KVDhtml_Tools::out($input)); } }
/** * generateOption * * @param mixed $value * @param string $omschrijving * @param mixed $selected * @return string */ protected function generateOption($value, $omschrijving, $selected = false) { $selected = $selected ? ' selected="selected"' : ''; return sprintf(self::$optionFormat, KVDhtml_Tools::out($value), $selected, KVDhtml_Tools::out($omschrijving)); }