-
Notifications
You must be signed in to change notification settings - Fork 0
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
- Loading branch information
dholi
committed
Oct 1, 2021
1 parent
cb3163a
commit be63bc8
Showing
4 changed files
with
72 additions
and
62 deletions.
There are no files selected for viewing
26 changes: 26 additions & 0 deletions
26
src/module-bling/Block/Adminhtml/System/Config/Documentation.php
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,26 @@ | ||
<?php | ||
/** | ||
* | ||
* Bling para Magento 2 | ||
* | ||
* @category elOOm | ||
* @package Modulo Bling | ||
* @copyright Copyright (c) 2021 elOOm (https://eloom.tech) | ||
* @version 1.0.0 | ||
* @license https://opensource.org/licenses/OSL-3.0 | ||
* @license https://opensource.org/licenses/AFL-3.0 | ||
* | ||
*/ | ||
declare(strict_types=1); | ||
|
||
namespace Eloom\Bling\Block\Adminhtml\System\Config; | ||
|
||
use Magento\Config\Block\System\Config\Form\Field; | ||
use Magento\Framework\Data\Form\Element\AbstractElement; | ||
|
||
class Documentation extends Field { | ||
|
||
protected function _getElementHtml(AbstractElement $element) { | ||
return '<a href="https://docs.eloom.tech/bling/" target="_blank">' . __('Documentation') . '</a>'; | ||
} | ||
} |
59 changes: 0 additions & 59 deletions
59
src/module-bling/Block/Adminhtml/System/Config/Information.php
This file was deleted.
Oops, something went wrong.
35 changes: 35 additions & 0 deletions
35
src/module-bling/Block/Adminhtml/System/Config/InstalledVersion.php
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,35 @@ | ||
<?php | ||
/** | ||
* | ||
* Bling para Magento 2 | ||
* | ||
* @category elOOm | ||
* @package Modulo Bling | ||
* @copyright Copyright (c) 2021 elOOm (https://eloom.tech) | ||
* @version 1.0.0 | ||
* @license https://opensource.org/licenses/OSL-3.0 | ||
* @license https://opensource.org/licenses/AFL-3.0 | ||
* | ||
*/ | ||
declare(strict_types=1); | ||
|
||
namespace Eloom\Bling\Block\Adminhtml\System\Config; | ||
|
||
use Magento\Config\Block\System\Config\Form\Field; | ||
use Magento\Framework\App\ObjectManager; | ||
use Magento\Framework\Data\Form\Element\AbstractElement; | ||
use Magento\Framework\Module\ModuleResource; | ||
|
||
class InstalledVersion extends Field { | ||
|
||
protected function _getElementHtml(AbstractElement $element) { | ||
$objectManager = ObjectManager::getInstance(); | ||
$moduleResource = $objectManager->create(ModuleResource::class); | ||
|
||
$dbVersion = (string)$moduleResource->getDbVersion('Eloom_Bling'); | ||
|
||
$element->setValue($dbVersion); | ||
|
||
return '<strong>' . $element->getEscapedValue() . '</strong> - [<a href="https://github.com/eloom/module-bling/releases" target="_blank">' . __('Releases') . '</a>]'; | ||
} | ||
} |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters