PluginProbe
GiveWP – Donation Plugin and Fundraising Platform / 4.16.9
GiveWP – Donation Plugin and Fundraising Platform v4.16.9
4.16.9 4.16.8.1 4.16.8 4.16.7.2 4.16.7.1 4.16.7 4.16.6.1 4.16.6 4.16.5.1 4.16.5 4.16.4 4.16.3 4.16.2 4.16.1 4.16.0 4.15.5 4.15.4 4.15.3 4.15.2 4.15.1 4.15.0 2.3.0 2.3.1 2.3.2 2.30.0 All 255 releases
give / src / Subscriptions / ListTable / Columns / RenewalDateColumn.php

RenewalDateColumn.php in GiveWP – Donation Plugin and Fundraising Platform 4.16.9, at src/Subscriptions/ListTable/Columns/RenewalDateColumn.php

54 lines 1010 B
No matching file
Up and down to move Enter to open Esc to close
Raw Download Zip
1 <?php
2
3 declare(strict_types=1);
4
5 namespace Give\Subscriptions\ListTable\Columns;
6
7 use Give\Subscriptions\Models\Subscription;
8 use Give\Framework\ListTable\ModelColumn;
9 use Give\Framework\Support\Facades\DateTime\Temporal;
10
11 /**
12 * @since 2.24.0
13 *
14 * @extends ModelColumn<Subscription>
15 */
16 class RenewalDateColumn extends ModelColumn
17 {
18
19 protected $sortColumn = 'renewsAt';
20
21 /**
22 * @since 2.24.0
23 *
24 * @inheritDoc
25 */
26 public static function getId(): string
27 {
28 return 'renewalDate';
29 }
30
31 /**
32 * @since 2.24.0
33 *
34 * @inheritDoc
35 */
36 public function getLabel(): string
37 {
38 return __('Next payment date', 'give');
39 }
40
41 /**
42 * @since 4.13.0 updated the date format
43 * @since 2.24.0
44 *
45 * @inheritDoc
46 *
47 * @param Subscription $model
48 */
49 public function getCellValue($model, $locale = ''): string
50 {
51 return Temporal::getFormattedDateTimeUsingTimeZoneAndFormatSettings($model->renewsAt);
52 }
53 }
54