Advertisement

Regarding getState access in the helper page Topic is solved

For Joomla! 4.x Coding related discussions, you could also use: http://groups.google.com/group/joomla-dev-general

Moderators: ooffick, General Support Moderators

Forum rules
Forum Rules
Absolute Beginner's Guide to Joomla! <-- please read before posting, this means YOU.
Forum Post Assistant - If you are serious about wanting help, you will use this tool to help you post.
Windows Defender SmartScreen Issues <-- please read this if using Windows 10.
Post Reply
chetnath
Joomla! Apprentice
Joomla! Apprentice
Posts: 37
Joined: Tue Dec 18, 2012 2:56 pm

Regarding getState access in the helper page

Post by chetnath » Sun Feb 11, 2024 10:45 am

Hi

How can i call this " $this->getState('list.approved_ac_form') " state method in the helper file.
Because right now getting error " Using $this when not in object context " when try to access above method in the helper file.

And when i try to access using getUserState() method OR getUserStateFormRequest() method, also getting the errors

Thanks
CP

Advertisement
User avatar
ceford
Joomla! Hero
Joomla! Hero
Posts: 2877
Joined: Mon Feb 24, 2014 10:38 pm
Location: Edinburgh, Scotland
Contact:

Re: Regarding getState access in the helper page

Post by ceford » Mon Feb 12, 2024 9:53 am

$this->getState is a model function, so you need to get the appropriate model in your helper function and then try $model->getState.

chetnath
Joomla! Apprentice
Joomla! Apprentice
Posts: 37
Joined: Tue Dec 18, 2012 2:56 pm

Re: Regarding getState access in the helper page

Post by chetnath » Thu Feb 15, 2024 5:18 am

Yes, That's correct.
I have fixed this issue.


Thanks

Advertisement

Post Reply

Return to “Joomla! 4.x Coding”