Adding variable to custom get public function #80
Labels
No Milestone
No project
No Assignees
1 Participants
Notifications
Due Date
No due date set.
Dependencies
No dependencies set.
Reference: joomla/Component-Builder#80
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?
I'm trying to figure this one out in JCB...
Currently, I have a custom get which creates the following public function:
public function getImage()
I need to be able to add a variable in the (). In the code itself I could manually add it, but is there a way in JCB to get the public function as:
public function getImages($property_id)
At this point the Joomla get method in the view does not allow for a signature method (method that takes values)
So you will get the result of that method in the view with
$this->get('Images');
and so you can pass values to the method. So the best way is to use class values, if you have a value in one method that you need in another, set it to a class value like this$this->property_id = $property_id;
this way you can get the value without passing it to the method.