public function getCategory($post, $options = array())
{
if (!empty($post['BlogCategory']['name'])) {
$options = am(array('link' => true), $options);
$link = false;
if ($options['link']) {
$link = true;
}
unset($options['link']);
if ($link) {
if (!isset($this->Html)) {
App::uses('HtmlHelper', 'View/Helper');
$this->Html = new HtmlHelper($this->_View);
}
return $this->Html->link($post['BlogCategory']['title'], $this->getCategoryUrl($post['BlogCategory']['id'], $options), $options, null, false);
} else {
return $post['BlogCategory']['title'];
}
} else {
return '';
}
}