protected function _renderObject(ComActivitiesActivityObjectInterface $object, KObjectConfig $config)
    {
        $config->append(array('html' => true, 'escaped_urls' => true, 'fqr' => false, 'links' => true));

        if ($output = $object->getDisplayName())
        {
            if ($config->html)
            {
                $output  = $object->getDisplayName();
                $attribs = $object->getAttributes() ? $this->buildAttributes($object->getAttributes()) : '';

                if ($config->links && $url = $object->getUrl())
                {
                    // Make sure we have a fully qualified route.
                    if ($config->fqr && !$url->getHost()) {
                        $url->setUrl($this->getTemplate()->url()->toString(KHttpUrl::AUTHORITY));
                    }

                    $url    = $url->toString(KHttpUrl::FULL, $config->escaped_urls);
                    $output = "<a {$attribs} href=\"{$url}\">{$output}</a>";
                }
                else $output = "<span {$attribs}>{$output}</span>";
            }
        }
        else $output = '';

        return $output;
    }