EmailRepository.php
11 months ago
LevelOrderRepository.php
11 months ago
LevelRepository.php
11 months ago
MemberActivityRepository.php
11 months ago
MembershipChangeRepository.php
11 months ago
MembershipRepository.php
11 months ago
PageRepository.php
11 months ago
Repository.php
11 months ago
SettingsRepository.php
11 months ago
UserRepository.php
11 months ago
LevelOrderRepository.php
26 lines
| 1 | <?php |
| 2 | |
| 3 | namespace FapiMember\Repository; |
| 4 | |
| 5 | use FapiMember\Model\Enums\Keys\OptionKey; |
| 6 | |
| 7 | class LevelOrderRepository extends Repository |
| 8 | { |
| 9 | |
| 10 | public function __construct() |
| 11 | { |
| 12 | $this->key = OptionKey::LEVELS_ORDER; |
| 13 | } |
| 14 | |
| 15 | public function get(): array |
| 16 | { |
| 17 | return get_option($this->key, []); |
| 18 | } |
| 19 | |
| 20 | public function set(array $ordering): void |
| 21 | { |
| 22 | update_option($this->key, $ordering); |
| 23 | } |
| 24 | |
| 25 | } |
| 26 |