The50 Posted December 7, 2016 Share Posted December 7, 2016 Hey, Is it possible to apply a function to columns on field list helpers? As example I have my fields_list like this: $this->fields_list = [ 'id_employee' => [ 'title' => $this->l('Employee ID'), 'type' => 'int', ], ]; And now I want to apply a function which gets an employee name by it's ID. Link to comment Share on other sites More sharing options...
The50 Posted December 7, 2016 Author Share Posted December 7, 2016 Sorry, already found the solution, just add the 'callback' parameter just like this: 'id_employee' => [ 'title' => $this->l('Creator'), 'type' => 'int', 'callback' => 'getEmployeeNameById', ], and put the name of the function which returns the result you want. 1 Link to comment Share on other sites More sharing options...
Recommended Posts
Create an account or sign in to comment
You need to be a member in order to leave a comment
Create an account
Sign up for a new account in our community. It's easy!
Register a new accountSign in
Already have an account? Sign in here.
Sign In Now