-
Notifications
You must be signed in to change notification settings - Fork 124
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Table Class set_data method throwing error #2765
Comments
@dmc-webdev it looks like the legacy table library contains some code that is designed to only work in CP. We also have We will probably classify this as feature request, and not as a bug - but could you tell us more about your intended usage of Tables functionality on front-end, so we could think of best possible implementation? |
I'm writing an add-on for a client that will pull race results from the Run Signup API. So taking the results array and just pushing it into the set_data method would be great. I have created the add-on to just have a tag pair with the race ID info passed into it. So get the race results from the API and output a table. The set_columns and generate methods work without being in the CP. My work around right now is using add_row. That works, but it's cumbersome. If you need anything more specific, just let me know. |
…e-out-of-cp Resolved #2765 where using `ee()->table->set_data()` was not possible outside of Control Panel
…e-out-of-cp Resolved #2765 where using `ee()->table->set_data()` was not possible outside of Control Panel
I'm writing an add-on that outputs a table of data to the user. It is not for the CP, but it throws the following error:
No such property: 'cp' on ExpressionEngine\Legacy\Facade
ee/ExpressionEngine/Legacy/Facade.php:128
The code is in my mod.addon.php file in a method called results. Nothing fancy.
I removed my code and inserted the demo code from the Table Class docs into my method and it throws the same error. If I remove just the set_data call, it will output the table with the headers as expected. I'm not sure if it is intentional that the class only be used in the CP, but it seems like this should work in a module method as well.
Using EE 7.2.6
The text was updated successfully, but these errors were encountered: