Last active
December 29, 2023 13:41
-
-
Save ribafs/68d760e745d6c71521c0cf93be1499a2 to your computer and use it in GitHub Desktop.
Receive param value from xml in php component joomla 4
This file contains hidden or 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
My XML | |
<?xml version="1.0" encoding="UTF-8"?> | |
<extension type="component" version="3.0" method="upgrade"> | |
<name>testepar</name> | |
<creationDate>Outubro 2023</creationDate> | |
<author>Ribamar FS</author> | |
<authorEmail>[email protected]</authorEmail> | |
<authorUrl>https://ribamar.net.br</authorUrl> | |
<copyright>Copyright (C) 2016 Ribamar FS. All rights reserved.</copyright> | |
<license>http://www.gnu.org/licenses/gpl-2.0.html GNU/GPL</license> | |
<version>2.0</version> | |
<description>Componente de teste de envio de parametro Joomla</description> | |
<administration> | |
<menu>COM_TESTEPAR</menu> | |
<files folder="admin"> | |
<filename>testepar.php</filename> | |
</files> | |
<config> | |
<fields name="params"> | |
<fieldset name="backup"> | |
<field name="testepar" default="none" /> | |
</fieldset> | |
</fields> | |
</config> | |
</administration> | |
</extension> | |
My PHP | |
<?php | |
/** | |
* @author-name Ribamar FS | |
*/ | |
defined('_JEXEC') or die('Restricted access'); | |
ini_set('display_errors', 1); | |
ini_set('display_startup_errors', 1); | |
error_reporting(E_ALL); | |
$param=JComponentHelper::getParams('com_teste')->get('testepar'); | |
print "OK?"; | |
print $param; | |
?> | |
Result | |
blank page |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment