protected function handleLayoutFile(&$layoutFiles, $path)
    {
        $aliased = Yii::getAlias($path, false);
        $filePath = $aliased ? $aliased : $path;
        
        if (is_dir($filePath)) {
            foreach ($this->getFilesFromFolder($filePath) as $file) {
                $handler = $this->importLayoutFile($file, $path);
                if ($handler) {
                    $layoutFiles[] = $handler;
                }
            }
        } else {
            $handler = $this->importLayoutFile($filePath, $path);
            if ($handler) {
                $layoutFiles[] = $handler;
            }
        }
    }