Commit 41385ed4 by Qiang Xue

code cleanup.

parent 7eabaeca
......@@ -108,43 +108,6 @@ class DefaultController extends Controller
}
/**
* @inheritdoc
*/
public function createUrl($params)
{
$params = (array)$params;
if (!isset($params['id']) && $this->generator !== null) {
foreach ($this->module->generators as $id => $generator) {
if ($generator === $this->generator) {
$params['id'] = $id;
break;
}
}
}
return parent::createUrl($params);
}
/**
* Creates URL for an aciton
*
* @param string $name name of the action
* @param array $params the parameters (name-value pairs) to be included in the generated URL
* @return string the created relative URL
*/
public function createActionUrl($name, $params = [])
{
foreach ($this->module->generators as $id => $generator) {
if ($generator === $this->generator) {
$params['id'] = $id;
break;
}
}
$params['name'] = $name;
$params[0] = 'action';
return parent::createUrl($params);
}
/**
* Loads the generator with the specified ID.
* @param string $id the ID of the generator to be loaded.
* @return \yii\gii\Generator the loaded generator
......
......@@ -8,7 +8,7 @@ use yii\gii\CodeFile;
/**
* @var yii\web\View $this
* @var yii\gii\Generator $generator
* @var string $id
* @var string $id panel ID
* @var yii\widgets\ActiveForm $form
* @var string $results
* @var boolean $hasError
......
......@@ -8,6 +8,7 @@ use yii\gii\CodeFile;
* @var \yii\gii\Generator $generator
* @var CodeFile[] $files
* @var array $answers
* @var string $id panel ID
*/
?>
<div class="default-view-files">
......
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