~xibo-maintainers/xibo/tempel

« back to all changes in this revision

Viewing changes to lib/Controller/Logging.php

  • Committer: Dan Garner
  • Date: 2016-06-28 15:02:11 UTC
  • mto: This revision was merged to the branch mainline in revision 528.
  • Revision ID: git-v1:51031805c36c1d366fa330b2c2320d1927c57003
Fixes for upgrade steps

Show diffs side-by-side

added added

removed removed

Lines of Context:
23
23
use Xibo\Exception\AccessDeniedException;
24
24
use Xibo\Factory\DisplayFactory;
25
25
use Xibo\Factory\LogFactory;
26
 
use Xibo\Factory\UserFactory;
27
26
use Xibo\Service\ConfigServiceInterface;
28
27
use Xibo\Service\DateServiceInterface;
29
28
use Xibo\Service\LogServiceInterface;
41
40
     */
42
41
    private $logFactory;
43
42
 
44
 
    /** @var StorageServiceInterface  */
45
 
    private $store;
46
 
 
47
43
    /**
48
44
     * @var DisplayFactory
49
45
     */
50
46
    private $displayFactory;
51
47
 
52
 
    /** @var  UserFactory */
53
 
    private $userFactory;
54
 
 
55
48
    /**
56
49
     * Set common dependencies.
57
50
     * @param LogServiceInterface $log
64
57
     * @param StorageServiceInterface $store
65
58
     * @param LogFactory $logFactory
66
59
     * @param DisplayFactory $displayFactory
67
 
     * @param UserFactory $userFactory
68
60
     */
69
 
    public function __construct($log, $sanitizerService, $state, $user, $help, $date, $config, $store, $logFactory, $displayFactory, $userFactory)
 
61
    public function __construct($log, $sanitizerService, $state, $user, $help, $date, $config, $store, $logFactory, $displayFactory)
70
62
    {
71
63
        $this->setCommonDependencies($log, $sanitizerService, $state, $user, $help, $date, $config);
72
64
 
73
65
        $this->store = $store;
74
66
        $this->logFactory = $logFactory;
75
67
        $this->displayFactory = $displayFactory;
76
 
        $this->userFactory = $userFactory;
77
68
    }
78
69
 
79
70
    public function displayPage()
80
71
    {
81
72
        $this->getState()->template = 'log-page';
82
73
        $this->getState()->setData([
83
 
            'displays' => $this->displayFactory->query(),
84
 
            'users' => $this->userFactory->query()
 
74
            'displays' => $this->displayFactory->query()
85
75
        ]);
86
76
    }
87
77
 
100
90
            'channel' => $this->getSanitizer()->getString('channel'),
101
91
            'function' => $this->getSanitizer()->getString('function'),
102
92
            'displayId' => $this->getSanitizer()->getInt('displayId'),
103
 
            'userId' => $this->getSanitizer()->getInt('userId'),
104
93
            'excludeLog' => 1,
105
 
            'runNo' => $this->getSanitizer()->getString('runNo'),
106
 
            'message' => $this->getSanitizer()->getString('message')
 
94
            'runNo' => $this->getSanitizer()->getString('runNo')
107
95
        ]));
108
96
 
109
97
        $this->getState()->template = 'grid';