public function getProjectLabel(Project $project, $tag = 'info')
    {
        $title = $project->title;
        $pattern = strlen($title) > 0 ? '%2$s (%3$s)' : '%3$s';
        if ($tag !== false) {
            $pattern = strlen($title) > 0 ? '<%1$s>%2$s</%1$s> (%3$s)' : '<%1$s>%3$s</%1$s>';
        }

        return sprintf($pattern, $tag, $title, $project->id);
    }
public function getProjectLabel(Project $project, $tag = 'info')
    {
        $title = $project->title;
        $pattern = strlen($title) > 0 ? '%2$s (%3$s)' : '%3$s';
        if ($tag !== false) {
            $pattern = strlen($title) > 0 ? '<%1$s>%2$s</%1$s> (%3$s)' : '<%1$s>%3$s</%1$s>';
        }

        return sprintf($pattern, $tag, $title, $project->id);
    }
public function getProjectLabel ( Project $ project , $ tag = 'info' ) { $ title = $ project -> title ; $ pattern = strlen ( $ title ) > 0 ? '%2$s (%3$s)' : '%3$s' ; if ( $ tag !== false ) { $ pattern = strlen ( $ title ) > 0 ? '<%1$s>%2$s</%1$s> (%3$s)' : '<%1$s>%3$s</%1$s>' ; } return sprintf ( $ pattern , $ tag , $ title , $ project -> id ) ; }
Returns a project label.

@param Project      $project
@param string|false $tag

@return string
Returns a project label .