예제 #1
0
 public function addComponent($component)
 {
     if (!$component instanceof TableCell) {
         $component = new TableCell($component);
     }
     parent::addComponent($component);
 }
예제 #2
0
 public function getOptions()
 {
     $source = $this->getUrl();
     $alt = $this->getAlternative();
     $title = $this->getTitle();
     $sourcePart = ' src="' . $source->toString() . '"';
     $altPart = ' alt="' . htmlspecialchars($alt) . '"';
     $titlePart = !empty($title) ? ' title="' . htmlspecialchars($title) . '"' : '';
     return parent::getOptions() . $sourcePart . $titlePart . $altPart;
 }
예제 #3
0
 public function getOptions()
 {
     $url = $this->getUrl()->toString($this->forceFull);
     $title = $this->getTitle();
     $onClick = $this->getOnClick();
     $newWindow = $this->newWindow;
     $urlPart = $url === null ? '' : ' href="' . $url . '"';
     $titlePart = $title === null ? '' : ' title="' . $title . '"';
     $onClickPart = $onClick === null ? '' : ' onclick="' . $onClick . '"';
     $targetPart = $newWindow === true ? ' target="_blank"' : '';
     return parent::getOptions() . $urlPart . $titlePart . $targetPart . $onClickPart;
 }
 public function addComponent($content)
 {
     parent::addComponent(new ListElement($content));
 }
예제 #5
0
 public function getOptions()
 {
     $mail = $this->getMail();
     $mailPart = !empty($mail) ? ' href="mailto:' . $mail . '"' : '';
     return parent::getOptions() . $mailPart;
 }
예제 #6
0
 public function getOptions()
 {
     $name = $this->getName();
     $namePart = $name === null ? '' : ' name="' . $name . '"';
     return parent::getOptions() . $namePart;
 }