public function configTheModel($config, $model)
    {
        if (!empty($config['schema'])) {
            $model = str_replace('// _camel_case_ table data', $this->tableService->prepareTableDefinition($config['schema']), $model);
        }

        if (!empty($config['relationships'])) {
            $relationships = [];

            foreach (explode(',', $config['relationships']) as $relationshipExpression) {
                $relationships[] = explode('|', $relationshipExpression);
            }

            $model = str_replace('// _camel_case_ relationships', $this->prepareModelRelationships($relationships), $model);
        }

        return $model;
    }
public function configTheModel($config, $model)
    {
        if (!empty($config['schema'])) {
            $model = str_replace('// _camel_case_ table data', $this->tableService->prepareTableDefinition($config['schema']), $model);
        }

        if (!empty($config['relationships'])) {
            $relationships = [];

            foreach (explode(',', $config['relationships']) as $relationshipExpression) {
                $relationships[] = explode('|', $relationshipExpression);
            }

            $model = str_replace('// _camel_case_ relationships', $this->prepareModelRelationships($relationships), $model);
        }

        return $model;
    }
public function configTheModel ( $ config , $ model ) { if ( ! empty ( $ config [ 'schema' ] ) ) { $ model = str_replace ( '// _camel_case_ table data' , $ this -> tableService -> prepareTableDefinition ( $ config [ 'schema' ] ) , $ model ) ; } if ( ! empty ( $ config [ 'relationships' ] ) ) { $ relationships = [ ] ; foreach ( explode ( ',' , $ config [ 'relationships' ] ) as $ relationshipExpression ) { $ relationships [ ] = explode ( '|' , $ relationshipExpression ) ; } $ model = str_replace ( '// _camel_case_ relationships' , $ this -> prepareModelRelationships ( $ relationships ) , $ model ) ; } return $ model ; }
Configure the model.

@param array  $config
@param string $model

@return string
Configure the model .