You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
My apologies zoghal, I took too much time to respond.
This code will check relationships like hasMany, belongsTo or hasOne and tries to fetch translated data for the find operation on current model.
e.g.
// Menu model
class Menu extends AppModel {
public $hasMany = 'Link';
public $actsAs = array('MultiTranslate' => array('name'));
// Link model
class Link extends AppModel {
public $actsAs = array('MultiTranslate' => array('name'));
// Menu Controller
class MenuController extends AppController {
public function index($id) {
$menu = $this->Menu->findById($id);
}
Your extension works great, except fetching related model's data on find operations.
So I changed your
behavior
a little to fetch related data, please checkout my commit.ish1301@6b42cf1
The text was updated successfully, but these errors were encountered: