forked from modstart/ModStartBlog
-
Notifications
You must be signed in to change notification settings - Fork 0
Expand file tree
/
Copy pathPartnerView.php
More file actions
65 lines (56 loc) · 2.13 KB
/
Copy pathPartnerView.php
File metadata and controls
65 lines (56 loc) · 2.13 KB
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
<?php
namespace Module\Partner\View;
use Illuminate\Support\Facades\View;
use ModStart\ModStart;
use Module\Partner\Util\PartnerUtil;
class PartnerView
{
public static function text($position, $param = [])
{
$records = PartnerUtil::listByPositionWithCache($position);
$linkDisable = modstart_config('Partner_LinkDisable', false);
return View::make('module::Partner.View.inc.text', array_merge($param, [
'records' => $records,
'position' => $position,
'linkDisable' => $linkDisable,
]))->render();
}
public static function simple($position, $param = [])
{
ModStart::js('asset/common/lazyLoad.js');
$linkDisable = modstart_config('Partner_LinkDisable', false);
$records = PartnerUtil::listByPositionWithCache($position);
return View::make('module::Partner.View.inc.simple', array_merge($param, [
'records' => $records,
'position' => $position,
'linkDisable' => $linkDisable,
]))->render();
}
public static function mini($position, $param = [])
{
ModStart::js('asset/common/lazyLoad.js');
$records = PartnerUtil::listByPositionWithCache($position);
$linkDisable = modstart_config('Partner_LinkDisable', false);
return View::make('module::Partner.View.inc.mini', array_merge($param, [
'records' => $records,
'linkDisable' => $linkDisable,
'position' => $position,
]))->render();
}
public static function transparent($position, $param = [])
{
$records = PartnerUtil::listByPositionWithCache($position);
return View::make('module::Partner.View.inc.transparent', array_merge($param, [
'records' => $records,
'position' => $position,
]))->render();
}
public static function raw($position, $param = [])
{
$records = PartnerUtil::listByPositionWithCache($position);
return View::make('module::Partner.View.inc.raw', array_merge($param, [
'records' => $records,
'position' => $position,
]))->render();
}
}