override belongto parent appmodel cakephp

Solutions on MaxInterview for override belongto parent appmodel cakephp by the best coders in the world

showing results for - "override belongto parent appmodel cakephp"
Hazeline
08 Sep 2019
1// -------------------------------------------------------------
2// ------------ Override belongto parent appmodel --------------
3// -------------------------------------------------------------
4public function __construct($id = false, $table = null, $ds = null) {
5    $parent = get_parent_class($this);
6    $this->_mergeVars(array('belongsTo'), $parent);	// override belongto parent appmodel
7
8    parent::__construct($id, $table, $ds);
9}
Angelo
03 Mar 2020
1'joins' => array(
2        array(
3            'table' => Environment::read('table_prefix') . 'image_type_languages', 
4            'alias' => 'language',
5            'type' => 'INNER',
6            'conditions'=> array(
7                'ImageType.id = language.image_type_id',
8                'language.alias = \'' . $language . '\'',
9            )
10        ),
11    ),