@@ 84-86 (lines=3) @@ | ||
81 | ||
82 | $buttons = []; |
|
83 | ||
84 | if ($current_page > 1 && $labels['first'] !== null) { |
|
85 | $buttons[] = new InlineKeyboardButton(['text' => $labels['first'], 'callback_data' => $callbacks_data['first']]); |
|
86 | } |
|
87 | if ($current_page > 2 && $labels['previous'] !== null) { |
|
88 | $buttons[] = new InlineKeyboardButton(['text' => $labels['previous'], 'callback_data' => $callbacks_data['previous']]); |
|
89 | } |
|
@@ 87-89 (lines=3) @@ | ||
84 | if ($current_page > 1 && $labels['first'] !== null) { |
|
85 | $buttons[] = new InlineKeyboardButton(['text' => $labels['first'], 'callback_data' => $callbacks_data['first']]); |
|
86 | } |
|
87 | if ($current_page > 2 && $labels['previous'] !== null) { |
|
88 | $buttons[] = new InlineKeyboardButton(['text' => $labels['previous'], 'callback_data' => $callbacks_data['previous']]); |
|
89 | } |
|
90 | ||
91 | if ($labels['current'] !== null) { |
|
92 | $buttons[] = new InlineKeyboardButton(['text' => $labels['current'], 'callback_data' => $callbacks_data['current']]); |
|
@@ 91-93 (lines=3) @@ | ||
88 | $buttons[] = new InlineKeyboardButton(['text' => $labels['previous'], 'callback_data' => $callbacks_data['previous']]); |
|
89 | } |
|
90 | ||
91 | if ($labels['current'] !== null) { |
|
92 | $buttons[] = new InlineKeyboardButton(['text' => $labels['current'], 'callback_data' => $callbacks_data['current']]); |
|
93 | } |
|
94 | ||
95 | if ($current_page < $max_pages - 1 && $labels['next'] !== null) { |
|
96 | $buttons[] = new InlineKeyboardButton(['text' => $labels['next'], 'callback_data' => $callbacks_data['next']]); |
|
@@ 95-97 (lines=3) @@ | ||
92 | $buttons[] = new InlineKeyboardButton(['text' => $labels['current'], 'callback_data' => $callbacks_data['current']]); |
|
93 | } |
|
94 | ||
95 | if ($current_page < $max_pages - 1 && $labels['next'] !== null) { |
|
96 | $buttons[] = new InlineKeyboardButton(['text' => $labels['next'], 'callback_data' => $callbacks_data['next']]); |
|
97 | } |
|
98 | if ($current_page < $max_pages && $labels['last'] !== null) { |
|
99 | $buttons[] = new InlineKeyboardButton(['text' => $labels['last'], 'callback_data' => $callbacks_data['last']]); |
|
100 | } |
|
@@ 98-100 (lines=3) @@ | ||
95 | if ($current_page < $max_pages - 1 && $labels['next'] !== null) { |
|
96 | $buttons[] = new InlineKeyboardButton(['text' => $labels['next'], 'callback_data' => $callbacks_data['next']]); |
|
97 | } |
|
98 | if ($current_page < $max_pages && $labels['last'] !== null) { |
|
99 | $buttons[] = new InlineKeyboardButton(['text' => $labels['last'], 'callback_data' => $callbacks_data['last']]); |
|
100 | } |
|
101 | ||
102 | return new InlineKeyboard($buttons); |
|
103 | } |