Completed
Push — development ( eb9524...db4517 )
by Andrij
28:49 queued 02:09
created

Brands::formUrl()   A

Complexity

Conditions 1
Paths 1

Size

Total Lines 3
Code Lines 2

Duplication

Lines 0
Ratio 0 %
Metric Value
dl 0
loc 3
rs 10
cc 1
eloc 2
nc 1
nop 1
1
<?php
2
3
namespace xbanners\src\UrlFinder\Finders;
4
5
final class Brands extends BaseFinder
6
{
0 ignored issues
show
introduced by
Opening brace of a class must be on the same line as the definition
Loading history...
7
8
    protected $table = 'shop_brands';
9
10
    protected $translations = 'shop_brands_i18n';
11
12
    protected $nameColumn = 'shop_brands_i18n.name';
13
14
    protected $urlColumn = 'shop_brands.url';
15
16
    protected $langColumn = 'shop_brands_i18n.locale';
17
18
    /**
19
     * @return string
20
     */
21
    public function getGroupName() {
22
        return lang('Brands', 'xbanners');
23
    }
24
25
    /**
26
     * @param string $url
27
     * @return string
28
     */
29
    public function formUrl($url) {
30
        return '/shop/brand/' . $url;
31
    }
32
33
}