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

PriorityViewHelper::render()   A

Complexity

Conditions 2
Paths 2

Size

Total Lines 8
Code Lines 5

Duplication

Lines 0
Ratio 0 %

Importance

Changes 1
Bugs 0 Features 1
Metric Value
c 1
b 0
f 1
dl 0
loc 8
rs 9.4285
cc 2
eloc 5
nc 2
nop 1
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