-
-
Notifications
You must be signed in to change notification settings - Fork 440
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
New feature: added support for type "label" to system.xml (#3849)
- Loading branch information
Showing
3 changed files
with
45 additions
and
2 deletions.
There are no files selected for viewing
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
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,44 @@ | ||
<?php | ||
/** | ||
* OpenMage | ||
* | ||
* This source file is subject to the Open Software License (OSL 3.0) | ||
* that is bundled with this package in the file LICENSE.txt. | ||
* It is also available at https://opensource.org/license/osl-3-0-php | ||
* | ||
* @category Varien | ||
* @package Varien_Data | ||
* @copyright Copyright (c) 2024 The OpenMage Contributors (https://www.openmage.org) | ||
* @license https://opensource.org/licenses/osl-3.0.php Open Software License (OSL 3.0) | ||
*/ | ||
|
||
/** | ||
* @category Varien | ||
* @package Varien_Data | ||
*/ | ||
class Varien_Data_Form_Element_Info extends Varien_Data_Form_Element_Abstract | ||
{ | ||
/** | ||
* @param array $attributes | ||
*/ | ||
public function __construct($attributes = []) | ||
{ | ||
parent::__construct($attributes); | ||
$this | ||
->setType('info') | ||
->unsScope() | ||
->unsCanUseDefaultValue() | ||
->unsCanUseWebsiteValue(); | ||
} | ||
|
||
/** | ||
* @return string | ||
*/ | ||
public function getHtml() | ||
{ | ||
$id = $this->getHtmlId(); | ||
$label = $this->getLabel(); | ||
$html = '<tr class="' . $id . '"><td class="label" colspan="99"><label>' . $label . '</label></td></tr>'; | ||
return $html; | ||
} | ||
} |
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