template/helper/activity.php
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;
    }
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;
    }
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 ; }
Renders an activity object.

@param ComActivitiesActivityObjectInterface $object The activity object.
@param KObjectConfig                        $config The configuration object.
@return string The rendered object.
Renders an activity object .