×
Please submit new Bug Reports on GitHub: github.com/Jensen-Technologies/component-creator-issues/issues
JLoader::register/import
Micha Hobert
Nouveau membre
Posts: 2
il y a 9 ans 4 mois #871
par Micha Hobert
JLoader::register/import a été créé par Micha Hobert
Hey there,
I am using Joomla 3.4.x and I want to register or import an class to my view.
class: LookupHelfer
file: helfers.php
I am not using any frontend views, just backend. So what am I doing wrong? I call the function email() in my eventlist.php and before that I do the JLoader import. Anybody?
I am using Joomla 3.4.x and I want to register or import an class to my view.
JLoader::import('LookupHelper', JPATH_COMPONENT_ADMINISTRATOR.'/helpers/helfers.php');
file: helfers.php
I am not using any frontend views, just backend. So what am I doing wrong? I call the function email() in my eventlist.php and before that I do the JLoader import. Anybody?
Connexion ou Créer un compte pour participer à la conversation.
Victor
Administrateur
Posts: 19
il y a 9 ans 4 mois #872
par Victor
Back-end developer on Component Creator
Réponse de Victor sur le sujet JLoader::register/import
HI Micha,
I'm Victor, Back-end developer of Component Creator. To include a class into the loader, what you would have to is:
I'm Victor, Back-end developer of Component Creator. To include a class into the loader, what you would have to is:
JLoader::register('LookupHelper', JPATH_COMPONENT_ADMINISTRATOR.'/helpers/helfers.php');
Back-end developer on Component Creator
Connexion ou Créer un compte pour participer à la conversation.
Micha Hobert
Nouveau membre
Posts: 2
il y a 9 ans 4 mois #874
par Micha Hobert
Réponse de Micha Hobert sur le sujet JLoader::register/import
That´s what I also tried, but it´s throwing me the exception "class not found" :/
Connexion ou Créer un compte pour participer à la conversation.
Victor
Administrateur
Posts: 19
il y a 9 ans 4 mois #875
par Victor
Back-end developer on Component Creator
Réponse de Victor sur le sujet JLoader::register/import
Hi again Micha,
Let's try something else, instead of use JPATH_COMPONENT_ADMINISTRATOR, let's use JPATH_ADMINISTRATOR. '/com_name/helpers/helfers.php
Let's try something else, instead of use JPATH_COMPONENT_ADMINISTRATOR, let's use JPATH_ADMINISTRATOR. '/com_name/helpers/helfers.php
Back-end developer on Component Creator
Connexion ou Créer un compte pour participer à la conversation.
Temps de génération de la page : 0.056 secondes