Improvement? Option to add Joomla Obj instances (use statements) #592
Labels
No Milestone
No project
No Assignees
1 Participants
Notifications
Due Date
No due date set.
Dependencies
No dependencies set.
Reference: joomla/Component-Builder#592
Loading…
Reference in New Issue
Block a user
No description provided.
Delete Branch "%!s()"
Deleting a branch is permanent. Although the deleted branch may continue to exist for a short time before it actually gets removed, it CANNOT be undone in most cases. Continue?
Steps to reproduce the issue
Try to filter a query by date (like larger then current date or smaller then...).
In Joomla! You need to create a new Date instance for that. It is ok and the way to do that is to simply add
"use Joomla\CMS\Date\Date;" outside of your class(es) in the model.php then you can use something like :
$date = new Date(); inside your query before getting the items.
You cannot use the "use" statement inside of the class or function.
Expected result
A possibility to place own use statements in the model
Actual result
There is no way right?
How a model could look like:
Additional comments
If there is any way to do this already please let me know, i think i've tried every CB Backend Option to add my use statement.
Yes we should actually add the option to target controller, model, and view with the new name space implementation. This just makes sense.
I am working on a pro member plugin for this 👍 option to add header values.
For you to work with this for now is also simple:
or with JDate() check the class map;
Will bump this post when I release the header editing plugin to the pro members.
The option to add custom headers was asked in #548 so I will close this issue and you can follow the implementation in the initial request.
https://www.youtube.com/watch?v=TjoH5rj4UgM