EmailRepository.php
7 months ago
LevelOrderRepository.php
7 months ago
LevelRepository.php
7 months ago
MemberActivityRepository.php
7 months ago
MembershipChangeRepository.php
7 months ago
MembershipRepository.php
7 months ago
PageRepository.php
7 months ago
Repository.php
7 months ago
SettingsRepository.php
7 months ago
UserRepository.php
7 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 |