EditButton.php
2 days ago
EditorFavorites.php
2 days ago
EditorMenuStatus.php
2 days ago
IntegrationStatus.php
2 days ago
ListColumnOrder.php
2 days ago
ListScreenOrder.php
2 days ago
OriginalColumnsRepository.php
2 days ago
TableListOrder.php
2 days ago
UserColumnOrder.php
2 days 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 | private GeneralOption $storage; |
| 12 | |
| 13 | public function __construct(GeneralOption $storage) |
| 14 | { |
| 15 | $this->storage = $storage; |
| 16 | } |
| 17 | |
| 18 | public function is_active(): bool |
| 19 | { |
| 20 | $value = $this->storage->get('show_edit_button'); |
| 21 | |
| 22 | return in_array($value, ['1', null], true); |
| 23 | } |
| 24 | |
| 25 | } |
| 26 |