Commit 7baf261f by BelalWM

Fix phpdoc generation in gii model generator.

parent 85874dfd
...@@ -339,7 +339,7 @@ class Generator extends \yii\gii\Generator ...@@ -339,7 +339,7 @@ class Generator extends \yii\gii\Generator
$relationName = $this->generateRelationName($relations, $className0, $db->getTableSchema($table0), $table->primaryKey[1], true); $relationName = $this->generateRelationName($relations, $className0, $db->getTableSchema($table0), $table->primaryKey[1], true);
$relations[$className0][$relationName] = [ $relations[$className0][$relationName] = [
"return \$this->hasMany($className1::className(), $link)->viaTable('{$table->name}', $viaLink);", "return \$this->hasMany($className1::className(), $link)->viaTable('{$table->name}', $viaLink);",
$className0, $className1,
true, true,
]; ];
...@@ -348,7 +348,7 @@ class Generator extends \yii\gii\Generator ...@@ -348,7 +348,7 @@ class Generator extends \yii\gii\Generator
$relationName = $this->generateRelationName($relations, $className1, $db->getTableSchema($table1), $table->primaryKey[0], true); $relationName = $this->generateRelationName($relations, $className1, $db->getTableSchema($table1), $table->primaryKey[0], true);
$relations[$className1][$relationName] = [ $relations[$className1][$relationName] = [
"return \$this->hasMany($className0::className(), $link)->viaTable('{$table->name}', $viaLink);", "return \$this->hasMany($className0::className(), $link)->viaTable('{$table->name}', $viaLink);",
$className1, $className0,
true, true,
]; ];
} }
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment