1 | <?php |
||
12 | class Form implements Page |
||
13 | { |
||
14 | /** |
||
15 | * The logs table component. |
||
16 | * |
||
17 | * @var LogsTable |
||
18 | */ |
||
19 | private $logsTable; |
||
20 | |||
21 | /** |
||
22 | * The form type name. |
||
23 | * |
||
24 | * @var string |
||
25 | */ |
||
26 | private $formType; |
||
27 | |||
28 | /** |
||
29 | * Constructor. |
||
30 | * |
||
31 | * @param string $formType The form type name |
||
32 | * @param LogsTable $logsTable The logs table component |
||
33 | */ |
||
34 | public function __construct($formType, LogsTable $logsTable) |
||
39 | |||
40 | /** |
||
41 | * {@inheritdoc} |
||
42 | */ |
||
43 | public function display() |
||
44 | { |
||
45 | $wpLogsTable = $this->logsTable->load(); |
||
46 | $wpLogsTable->prepare_items(); ?> |
||
47 | <div class="wrap"> |
||
48 | <h2> |
||
49 | <?php _e('Sent emails logs of ', \WPSymfonyForm::TRANSLATION_DOMAIN); ?> |
||
50 | |||
51 | <?php echo '"' . $this->formType . '"' ?> |
||
52 | </h2> |
||
53 | <div id="poststuff"> |
||
54 | <div id="post-body" class="metabox-holder"> |
||
55 | <div id="post-body-content"> |
||
56 | <?php $wpLogsTable->display() ?> |
||
57 | </div> |
||
58 | </div> |
||
59 | <br class="clear"> |
||
60 | </div> |
||
61 | </div> |
||
62 | <?php |
||
63 | |||
64 | } |
||
65 | |||
66 | /** |
||
67 | * {@inheritdoc} |
||
68 | */ |
||
69 | public function screenOptions() |
||
77 | } |
||
78 |