public function cover($actor, $size = 'large', $linked = true, $attr = array())
    {
        if (is_numeric($size)) {
            $width = "width=\"$size\"";
            $size = 'large';
        } else {
            $width = '';
        }

        if ($actor->hasCover()) {
            $src = $actor->getCoverURL($size);

            $name = AnHelperString::ucwords($actor->name);
            $img = '<img '.$width.' alt="'.$name.'" class="cover" src="'.$src.'"  />';
        }

        if ($linked && $actor->authorize('access')) {
            $url = route($actor->getURL());
            $img = '<a '.$this->_buildAttribute($attr).' data-actor="'.$actor->id.'" href="'.$url.'" >'.$img.'</a>';
        }

        return $img;
    }
public function cover($actor, $size = 'large', $linked = true, $attr = array())
    {
        if (is_numeric($size)) {
            $width = "width=\"$size\"";
            $size = 'large';
        } else {
            $width = '';
        }

        if ($actor->hasCover()) {
            $src = $actor->getCoverURL($size);

            $name = AnHelperString::ucwords($actor->name);
            $img = '<img '.$width.' alt="'.$name.'" class="cover" src="'.$src.'"  />';
        }

        if ($linked && $actor->authorize('access')) {
            $url = route($actor->getURL());
            $img = '<a '.$this->_buildAttribute($attr).' data-actor="'.$actor->id.'" href="'.$url.'" >'.$img.'</a>';
        }

        return $img;
    }
public function cover ( $ actor , $ size = 'large' , $ linked = true , $ attr = array ( ) ) { if ( is_numeric ( $ size ) ) { $ width = "width=\"$size\"" ; $ size = 'large' ; } else { $ width = '' ; } if ( $ actor -> hasCover ( ) ) { $ src = $ actor -> getCoverURL ( $ size ) ; $ name = AnHelperString :: ucwords ( $ actor -> name ) ; $ img = '<img ' . $ width . ' alt="' . $ name . '" class="cover" src="' . $ src . '"  />' ; } if ( $ linked && $ actor -> authorize ( 'access' ) ) { $ url = route ( $ actor -> getURL ( ) ) ; $ img = '<a ' . $ this -> _buildAttribute ( $ attr ) . ' data-actor="' . $ actor -> id . '" href="' . $ url . '" >' . $ img . '</a>' ; } return $ img ; }
Draws an actor cover image.

@param ComActorsDomainEntityActor $actor
@param string                     $size
@param bool                       $linked if true it returns a linked image tag of not just an image tag
@param array                      $attr   link attributes

@return string
Draws an actor cover image .