protected function addAppointmentsToModel()
    {
        $model = new \MUtil_Model_TableModel('gems__track_appointments');
        \Gems_Model::setChangeFieldsByPrefix($model, 'gtap');

        $map = $model->getItemsOrdered();
        $map = array_combine($map, str_replace('gtap_', 'gtf_', $map));
        $map['gtap_id_app_field'] = 'gtf_id_field';

        $this->addUnionModel($model, $map, self::APPOINTMENTS_NAME);

        $model->addColumn(new \Zend_Db_Expr("'appointment'"), 'gtf_field_type');
        $model->addColumn(new \Zend_Db_Expr("NULL"), 'gtf_field_values');
        $model->addColumn(new \Zend_Db_Expr("NULL"), 'gtf_field_default');
        $model->addColumn(new \Zend_Db_Expr("NULL"), 'gtf_calculate_using');
    }
protected function addAppointmentsToModel()
    {
        $model = new \MUtil_Model_TableModel('gems__track_appointments');
        \Gems_Model::setChangeFieldsByPrefix($model, 'gtap');

        $map = $model->getItemsOrdered();
        $map = array_combine($map, str_replace('gtap_', 'gtf_', $map));
        $map['gtap_id_app_field'] = 'gtf_id_field';

        $this->addUnionModel($model, $map, self::APPOINTMENTS_NAME);

        $model->addColumn(new \Zend_Db_Expr("'appointment'"), 'gtf_field_type');
        $model->addColumn(new \Zend_Db_Expr("NULL"), 'gtf_field_values');
        $model->addColumn(new \Zend_Db_Expr("NULL"), 'gtf_field_default');
        $model->addColumn(new \Zend_Db_Expr("NULL"), 'gtf_calculate_using');
    }
protected function addAppointmentsToModel ( ) { $ model = new \ MUtil_Model_TableModel ( 'gems__track_appointments' ) ; \ Gems_Model :: setChangeFieldsByPrefix ( $ model , 'gtap' ) ; $ map = $ model -> getItemsOrdered ( ) ; $ map = array_combine ( $ map , str_replace ( 'gtap_' , 'gtf_' , $ map ) ) ; $ map [ 'gtap_id_app_field' ] = 'gtf_id_field' ; $ this -> addUnionModel ( $ model , $ map , self :: APPOINTMENTS_NAME ) ; $ model -> addColumn ( new \ Zend_Db_Expr ( "'appointment'" ) , 'gtf_field_type' ) ; $ model -> addColumn ( new \ Zend_Db_Expr ( "NULL" ) , 'gtf_field_values' ) ; $ model -> addColumn ( new \ Zend_Db_Expr ( "NULL" ) , 'gtf_field_default' ) ; $ model -> addColumn ( new \ Zend_Db_Expr ( "NULL" ) , 'gtf_calculate_using' ) ; }
Add appointment model to union model
Add appointment model to union model