Commits

Anonymous committed 50cda02

Added "common.models" searching (for autocomplete in Boilerplate structure).

Comments (0)

Files changed (1)

generators/AweCrud/AweCrudGenerator.php

     protected function getModels()
     {
         $models = array();
-        $files = scandir(Yii::getPathOfAlias('application.models'));
+        $files = ($commonFiles = Yii::getPathOfAlias('common.models')) ? scandir($commonFiles) : array();
+        $files = array_merge(scandir(Yii::getPathOfAlias('application.models')), $files);
         foreach ($files as $file) {
             if ($file[0] !== '.' && CFileHelper::getExtension($file) === 'php') {
                 $fileClassName = substr($file, 0, strpos($file, '.'));