1
2// ------------------- CONCAT USE virtualFields
3$this->virtualFields['myField'] = "CONCAT(language.name, ' (', language.description, ')' )"; // using this for use concat
4
5return $this->find('list', array(
6 'fields' => array(
7 'ImageType.id',
8 'myField',
9 ),
10 'conditions' => array(
11 'ImageType.slug LIKE' => $slug,
12 ),
13 'joins' => array(
14 array(
15 'table' => Environment::read('table_prefix') . 'image_type_languages',
16 'alias' => 'language',
17 'type' => 'INNER',
18 'conditions'=> array(
19 'ImageType.id = language.image_type_id',
20 'language.alias = \'' . $language . '\'',
21 )
22 ),
23 ),
24));