prepare_condition = $cond; parent::__construct(); } protected $bulk_delete_available = false; protected $entity = \GLCalendar\DateTimeBook::class; protected $columns = array( 'customer_id' => 'Customer', 'customer_email' => 'Customer Email', 'date' => 'Date', 'time' => 'Time', 'price' => 'Amount', 'created_at' => 'Created time', 'calendar_id' => 'Calendar', 'id' => 'ID', 'payment' => 'Payment' ); protected $sortable_columns = array( 'id', 'date', 'created_at', 'calendar_id', 'customer_id' ); protected function column_time ($item) { return \GLCalendar\BookingController::formatMinutes($item['time_from']).'-'. \GLCalendar\BookingController::formatMinutes($item['time_to']); } protected function column_calendar_id ($item) { return $item['calendar_name'] ." (ID {$item['calendar_id']})"; } protected function column_customer_id ($item) { return ''.$item['customer_name'].''; } protected function column_payment ($item) { if (!empty($item['transaction_id'])) { return "{$item['payment_status']}"; } else { return "Not required"; } } }