ExportedColumns.php
760 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
40
41
42
43
44
<?php
namespace ACP\Export\UserPreference;
use AC\Preferences\Site;
use AC\Type\ListScreenId;
class ExportedColumns {
/**
* @var Site
*/
private $user_preference;
public function __construct() {
$this->user_preference = new Site( 'export_columns' );
}
public function save( ListScreenId $id, array $column_names ): void {
$this->user_preference->set(
$id->get_id(),
$column_names
);
}
public function exists( ListScreenId $id ): bool {
return $this->user_preference->exists(
$id->get_id()
);
}
public function get( ListScreenId $id ): array {
return $this->user_preference->get(
$id->get_id()
);
}
public function delete( ListScreenId $id ): void {
$this->user_preference->delete(
$id->get_id()
);
}
}