|
1
|
|
|
<?php |
|
2
|
|
|
|
|
3
|
|
|
namespace samsoncms\newsletter; |
|
4
|
|
|
|
|
5
|
|
|
use samsoncms\email\field\Status; |
|
6
|
|
|
use samsoncms\email\field\Template; |
|
7
|
|
|
use samsoncms\field\Control; |
|
8
|
|
|
use samsoncms\field\Generic; |
|
9
|
|
|
|
|
10
|
|
|
class Collection extends \samsoncms\Collection |
|
11
|
|
|
{ |
|
12
|
|
|
/** {@inheritdoc} */ |
|
13
|
|
|
public function __construct($renderer, $query = null, $pager = null) |
|
14
|
|
|
{ |
|
15
|
|
|
// Fill default column fields for collection |
|
16
|
|
|
$this->fields = array( |
|
|
|
|
|
|
17
|
|
|
new Generic('distribution_id', t('#', true), 0, '', 0), |
|
|
|
|
|
|
18
|
|
|
new Template('template_id', t('Template', true), 0), |
|
19
|
|
|
new Generic('recipient_count', t('Recipients count', true), 0, '', 0), |
|
|
|
|
|
|
20
|
|
|
new Generic('open_count', t('Opens count', true), 0, '', 0), |
|
|
|
|
|
|
21
|
|
|
new Generic('click_count', t('Clicks count', true), 0, '', 0), |
|
|
|
|
|
|
22
|
|
|
new Status('status', t('Status', true), 0), |
|
23
|
|
|
new Generic('ts', t('Created', true), 10, '', 0), |
|
|
|
|
|
|
24
|
|
|
new Generic('finished', t('Finished', true), 10, '', 0), |
|
|
|
|
|
|
25
|
|
|
new Control(), |
|
26
|
|
|
); |
|
27
|
|
|
|
|
28
|
|
|
// Call parents |
|
29
|
|
|
parent::__construct($renderer, $query, $pager); |
|
30
|
|
|
|
|
31
|
|
|
$this->fill(); |
|
32
|
|
|
} |
|
33
|
|
|
} |
|
34
|
|
|
|
Our type inference engine has found an assignment to a property that is incompatible with the declared type of that property.
Either this assignment is in error or the assigned type should be added to the documentation/type hint for that property..