EditButton.php
3 months ago
EditorFavorites.php
3 months ago
EditorMenuStatus.php
3 months ago
IntegrationStatus.php
3 months ago
ListColumnOrder.php
3 months ago
ListScreenOrder.php
3 months ago
OriginalColumnsRepository.php
3 months ago
TableListOrder.php
3 months ago
UserColumnOrder.php
3 months ago
EditButton.php
26 lines
| 1 | <?php |
| 2 | |
| 3 | declare(strict_types=1); |
| 4 | |
| 5 | namespace AC\Storage\Repository; |
| 6 | |
| 7 | use AC\Settings\GeneralOption; |
| 8 | |
| 9 | class EditButton |
| 10 | { |
| 11 | |
| 12 | private GeneralOption $storage; |
| 13 | |
| 14 | public function __construct(GeneralOption $storage) |
| 15 | { |
| 16 | $this->storage = $storage; |
| 17 | } |
| 18 | |
| 19 | public function is_active(): bool |
| 20 | { |
| 21 | $value = $this->storage->get('show_edit_button'); |
| 22 | |
| 23 | return in_array($value, ['1', null], true); |
| 24 | } |
| 25 | |
| 26 | } |