Skip to content

Commit

Permalink
Target file alias support
Browse files Browse the repository at this point in the history
  • Loading branch information
pahanini committed Aug 25, 2015
1 parent 724d122 commit e367205
Showing 1 changed file with 3 additions and 3 deletions.
6 changes: 3 additions & 3 deletions controllers/BuildController.php
Original file line number Diff line number Diff line change
Expand Up @@ -23,7 +23,7 @@ class BuildController extends Controller
public $sortProperty = 'shortDescription';

/**
* @var string[]|string One ore more directories with controllers.
* @var string[]|string One ore more directories with controllers. You can use aliases.
*/
public $sourceDirs;

Expand All @@ -33,7 +33,7 @@ class BuildController extends Controller
public $sourceModules;

/**
* @var File to write result. If empty controller will output the result.
* @var File to write result. If empty controller will output the result. You can use file alias.
*/
public $targetFile;

Expand All @@ -59,7 +59,7 @@ public function actionRun()
}
$result = $this->renderPartial(Yii::getAlias($this->template), ['controllers' => $context->controllers]);
if ($this->targetFile) {
file_put_contents($this->targetFile, $result);
file_put_contents(Yii::getAlias($this->targetFile), $result);
} else {
echo $result;
}
Expand Down

0 comments on commit e367205

Please sign in to comment.