Bristol SU Support Package
src
Revision
HasRevisions.php
Go to the documentation of this file.
1
<?php
2
3
4
namespace
BristolSU\Support\Revision
;
5
6
7
use
BristolSU\Support\Authentication\Contracts\Authentication
;
8
use
Venturecraft\Revisionable\RevisionableTrait
;
9
10
trait
HasRevisions
11
{
12
use RevisionableTrait;
13
19
protected
$historyLimit;
20
26
protected
$revisionCleanup;
27
31
public
function
initializeHasRevisions()
32
{
33
$this->historyLimit = config(
'support.revision.cleanup.limit'
, 10000);
34
$this->revisionCleanup = config(
'support.revision.cleanup.enabled'
,
true
);
35
}
36
42
public
function
getSystemUserId()
43
{
44
$user = app(Authentication::class)->getUser();
45
return
($user === null ? null : $user->id());
46
}
47
48
49
}
Authentication
RevisionableTrait
BristolSU\Support\Revision
Definition:
HasRevisions.php:4
HasRevisions
Generated by
1.8.13