Group.php
762 Bytes
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
<?php
declare(strict_types=1);
namespace ACA\BP\ListTable;
use AC\ListTable;
use BP_Groups_List_Table;
class Group implements ListTable
{
use ListTable\WpListTableTrait;
public function __construct(BP_Groups_List_Table $table)
{
$this->table = $table;
}
public function get_column_value(string $column, int $id): string
{
return (string)apply_filters('bp_groups_admin_get_group_custom_column', '', $column, $this->get_group($id));
}
public function render_row(int $id): string
{
ob_start();
$this->table->single_row($this->get_group($id));
return ob_get_clean();
}
private function get_group(int $id): array
{
return (array)groups_get_group($id);
}
}