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
|
|
|
|
It seems like the type of the argument is not accepted by the function/method which you are calling.
In some cases, in particular if PHP’s automatic type-juggling kicks in this might be fine. In other cases, however this might be a bug.
We suggest to add an explicit type cast like in the following example: