PluginProbe ʕ •ᴥ•ʔ
Appointment Booking Plugin – LatePoint | Calendar & Scheduling for WordPress / 5.6.8
Appointment Booking Plugin – LatePoint | Calendar & Scheduling for WordPress v5.6.8
5.6.8 5.6.7 5.6.6 5.6.5 5.6.4 5.6.3 5.6.2 5.6.1 5.6.0 5.5.2 5.5.1 5.5.0 5.4.2 trunk 5.1.0 5.1.1 5.1.2 5.1.3 5.1.4 5.1.5 5.1.6 5.1.7 5.1.8 5.1.9 5.1.91 5.1.92 5.1.93 5.1.94 5.2.0 5.2.1 5.2.10 5.2.11 5.2.2 5.2.3 5.2.4 5.2.5 5.2.6 5.2.7 5.2.8 5.2.9 5.3.0 5.3.1 5.3.2 5.4.0 5.4.1
latepoint / lib / abilities / activities / abstract-activity-ability.php
latepoint / lib / abilities / activities Last commit date
abstract-activity-ability.php 4 months ago get-activity.php 4 months ago list-activities.php 4 months ago
abstract-activity-ability.php
33 lines
1 <?php
2 if ( ! defined( 'ABSPATH' ) ) {
3 exit;
4 }
5
6 abstract class LatePointAbstractActivityAbility extends LatePointAbstractAbility {
7
8 public function serialize_activity( OsActivityModel $a ): array {
9 return [
10 'id' => (int) $a->id,
11 'description' => $a->description ?? '',
12 'agent_id' => (int) $a->agent_id,
13 'booking_id' => (int) $a->booking_id,
14 'code' => $a->code ?? '',
15 'created_at' => ! empty( $a->created_at ) ? date( 'c', strtotime( $a->created_at ) ) : '',
16 ];
17 }
18
19 protected function activity_output_schema(): array {
20 return [
21 'type' => 'object',
22 'properties' => [
23 'id' => [ 'type' => 'integer' ],
24 'description' => [ 'type' => 'string' ],
25 'agent_id' => [ 'type' => 'integer' ],
26 'booking_id' => [ 'type' => 'integer' ],
27 'code' => [ 'type' => 'string' ],
28 'created_at' => [ 'type' => 'string' ],
29 ],
30 ];
31 }
32 }
33