blob: 3f14e08f3c36efc0485b55d4e1f249d7387beca1 [file] [log] [blame]
<?php
/**
* FoundationDocument()
*
* @author chrisguindon
*/
class FoundationDocument {
public $title = "";
public $description = "";
public $links = array();
public function setTitle($title) {
$this->title = $title;
}
public function getTitle() {
return $this->title;
}
public function setDescription($description) {
$this->description[] = $description;
}
public function getDescription() {
return implode('<br/><br/>', $this->description);
}
public function setLink($url, $text = 'Read More') {
$this->links = array(
'url' => $url,
'text' => $text
);
}
public function getLink() {
if (empty($this->links)) {
return '';
}
return '<a href="' . $this->links['url'] . '" class="btn-sm btn btn-primary" style="width:100%; font-size:12px;">' . $this->links['text'] . '</a>';
}
public function getTableRow() {
$html = '<tr><th scope="row">' . $this->getTitle() . '</th><td>' . $this->getDescription() . '</td>';
$html .= '<td class="text-center">' . $this->getLink() . '</td>';
$html .= '</tr>';
return $html;
}
}