-
Notifications
You must be signed in to change notification settings - Fork 16
Expand file tree
/
Copy pathBlogSiteUrlBiz.php
More file actions
42 lines (33 loc) · 900 Bytes
/
Copy pathBlogSiteUrlBiz.php
File metadata and controls
42 lines (33 loc) · 900 Bytes
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
<?php
namespace Module\Blog\Core;
use ModStart\Core\Dao\ModelUtil;
use Module\Vendor\Provider\SiteUrl\AbstractSiteUrlBiz;
class BlogSiteUrlBiz extends AbstractSiteUrlBiz
{
const NAME = 'blog';
public function name()
{
return self::NAME;
}
public function title()
{
return '博客';
}
public function urlBuildBatch($nextId, $param = [])
{
$records = [];
$batchRet = ModelUtil::batch('blog', $nextId);
$finish = empty($batchRet['records']);
foreach ($batchRet['records'] as $record) {
$records[] = [
'url' => modstart_web_url('blog/' . $record['id']),
'updateTime' => $record['updated_at'],
];
}
return [
'finish' => $finish,
'records' => $records,
'nextId' => $batchRet['nextId'],
];
}
}