Questions tagged [namespace]
The namespace tag has no usage guidance.
16
questions
0
votes
1
answer
31
views
Joomla\Filesystem\File or Joomla\CMS\Filesystem\File
The JED Checker recommends in Joomla 4 using
Joomla\Filesystem\File
isteand of
Joomla\CMS\Filesystem\File
because of the second one being deprecated in J5.
But when i use it things like this happen:...
2
votes
1
answer
112
views
Joomla 4 custom module namespace issue
I'm creating a custom module for Joomla 4, but having problems with namespacing.
I've been following the steps here: https://docs.joomla.org/Special:MyLanguage/J4.x:Creating_a_Simple_Module#Namespaces ...
0
votes
2
answers
89
views
Understanding namespaces and object instantiation in Joomla
PHP starts with the index.php, then index.php includes app.php, and then includes framework.php. This is where my confusion starts, maybe because of my lack of knowledge about namespaces.
In framework....
0
votes
2
answers
41
views
Using namespase USE in a module
I'm writing several joomla modules and I'd like to put common functions in the libraries folder. However I want to use them from a joomla Ajax call in my module. I'm preparing to upgrade from 3.x to ...
3
votes
1
answer
66
views
How to bootstrap loading of all libs and plugins from command line?
We have a special situation where we include Joomla from within Yii 2, which worked fine with Joomla 3, but Joomla 4.2 is so far giving us some problems. The latest issue is:
Error: Class "Joomla\...
2
votes
1
answer
62
views
Registering EasyPost library in J4 module - Class not found
I have created a very basic module to display EasyPost Tracking information for our customers. The module works in J3, but in J4 I get an error.
This is the code I have:
use Joomla\CMS\Factory;
$input ...
3
votes
1
answer
242
views
Joomla 4 Views will not load on some Hosts
Repo of component: https://github.com/Joomla-Bible-Study/Proclaim
We have been converting our component to Joomla 4 standards and have run into a problem with it installed on some hosts, and non of ...
2
votes
2
answers
1k
views
Loading a helper file in Joomla 4
I'm having trouble with using a helper file in Joomla 4, I'm not really sure where I'm going wrong.
I have a helper file in my template, like templates/mytemplate/html/helper.php and this works well ...
0
votes
1
answer
151
views
How to use 3rd party libraries with a Namespace?
I need to use a library I found on Github in an existing component, but my near non-existent knowledge of NAMESPACE is making it impossible.
To merge PDF files, I'm using the library at https://github....
2
votes
2
answers
483
views
Use HTMLHelper::_ by calling a namespaced class
In my component under Joomla! 4.0, I have the following call which returns:
error JHtml componentname not found.
HTMLHelper::_(
'componentname.link',
'index.php?option=com_component&view=...
0
votes
1
answer
74
views
How to check an extension is namespaced?
I'm working on namespaced templates feature and I came to the point where I need to check if an extension is namespaced or not.
One possibility would be to load the templateDetails.xml file and check ...
0
votes
1
answer
110
views
Set and Retrieve Array in Joomla Session Namespace [closed]
I have the need to use a namespace in session, so I am using the following to set the session:
$session = JFactory::getSession();
$customOrder['items'][] = $itemArray;
$session->set("order&...
1
vote
0
answers
369
views
Namespace class of component not found in script.php during clean install of component
in file script.php of component made for Joomla! 4.0-beta2-dev the namespace isn't found : Class 'Kunena\Forum\Libraries\Install\KunenaModelInstall' not foundClass
The changes in script.php : https://...
1
vote
1
answer
448
views
Library with namespace and autoloader example
I want to make a namespace for my Joomla components, but I can't find a clear example.
I want to declare multiple classes in my namespace and use autoloading.
For example:
namespacebas\xml
...
0
votes
0
answers
258
views
Load namespaced library from component in J!4
I'm using the latest build of J!4. I have a component that has library files under joomla_root\libraries\mycomponent but the namespaced files in this directory aren't loaded by Joomla! 4 autoloader.
...
2
votes
1
answer
1k
views
Joomla 4 namespacing and autoloading
I've added the namespace line to my manifest xml: <namespace>Mycompany\Component\Mycomponent</namespace>
When I install the component, I'm not seeing any alias added to the libraries/...