Skip to content

Commit

Permalink
Code refactoring
Browse files Browse the repository at this point in the history
  • Loading branch information
rommmka committed Apr 11, 2023
1 parent c7fae80 commit fb9de39
Show file tree
Hide file tree
Showing 3 changed files with 5 additions and 5 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -3,11 +3,11 @@

use Magento\Framework\Data\Form\Element\AbstractElement;

class FixAll extends \Magento\Config\Block\System\Config\Form\Field
class FixVirtualThemes extends \Magento\Config\Block\System\Config\Form\Field
{
public function render(AbstractElement $element)
{
$url = $this->getUrl('swissup/theme/fixAll');
$url = $this->getUrl('swissup/theme/fixVirtualThemes');
$cacheUrl = $this->getUrl('adminhtml/cache/index');
$buttonText = __("Fix All");
return <<<HTML
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -6,7 +6,7 @@
use Magento\Framework\Controller\ResultFactory;
use Magento\Theme\Model\ResourceModel\Theme\CollectionFactory;

class FixAll extends \Magento\Backend\App\Action
class FixVirtualThemes extends \Magento\Backend\App\Action
{
private CollectionFactory $collectionFactory;

Expand Down
4 changes: 2 additions & 2 deletions etc/adminhtml/system.xml
Original file line number Diff line number Diff line change
Expand Up @@ -24,8 +24,8 @@
<frontend_model>Swissup\Core\Block\Adminhtml\Config\Form\Field\VirtualCheck</frontend_model>
</field>
<field id="fix_all" translate="label" type="text" sortOrder="265" showInDefault="1" showInWebsite="1" showInStore="1">
<label>Fix All</label>
<frontend_model>Swissup\Core\Block\Adminhtml\Config\Form\Field\FixAll</frontend_model>
<label>Fix Virtual Themes</label>
<frontend_model>Swissup\Core\Block\Adminhtml\Config\Form\Field\FixVirtualThemes</frontend_model>
</field>
</group>
</section>
Expand Down

0 comments on commit fb9de39

Please sign in to comment.