Completed
Push — develop ( 3f20e4...cc55eb )
by
unknown
02:32
created

PriorityViewHelper   A

Complexity

Total Complexity 2

Size/Duplication

Total Lines 20
Duplicated Lines 0 %

Coupling/Cohesion

Components 0
Dependencies 0

Importance

Changes 1
Bugs 0 Features 1
Metric Value
wmc 2
c 1
b 0
f 1
lcom 0
cbo 0
dl 0
loc 20
rs 10

1 Method

Rating   Name   Duplication   Size   Complexity  
A render() 0 8 2
1
<?php
2
/**
3
 * Class PriorityViewHelper
4
 */
5
6
namespace HDNET\OnpageIntegration\ViewHelpers;
7
8
/**
9
 * Class PriorityViewHelper
10
 */
11
class PriorityViewHelper extends \TYPO3\CMS\Fluid\Core\ViewHelper\AbstractViewHelper
12
{
13
14
    /**
15
     * Generates the html output for
16
     * the priority ranking
17
     *
18
     * @param string $priority
19
     *
20
     * @return null|string
21
     */
22
    public function render($priority)
23
    {
24
        $html = null;
25
        for ($i = 0; $i < $priority; $i++) {
26
            $html .= "<span class=\"glyphicon glyphicon-asterisk\"></span>";
27
        }
28
        return $html;
29
    }
30
}
31