public function actionClearAll()
    {
        $module = \jacmoe\mdpages\Module::getInstance();

        if($this->confirm('Delete content and data directories ?')) {
            FileHelper::removeDirectory(Yii::getAlias($module->pages_directory));
            FileHelper::removeDirectory(Yii::getAlias($module->flywheel_config));
            FileHelper::removeDirectory(Yii::getAlias('@app/web') . DIRECTORY_SEPARATOR . 'avatars');
            $this->stdout("\nContent and data and avatars directories deleted.\n", Console::FG_GREEN);
        } else {
            $this->stdout("Nothing was deleted - command interrupted.\n", Console::FG_GREEN);
        }
    }
public function actionClearAll()
    {
        $module = \jacmoe\mdpages\Module::getInstance();

        if($this->confirm('Delete content and data directories ?')) {
            FileHelper::removeDirectory(Yii::getAlias($module->pages_directory));
            FileHelper::removeDirectory(Yii::getAlias($module->flywheel_config));
            FileHelper::removeDirectory(Yii::getAlias('@app/web') . DIRECTORY_SEPARATOR . 'avatars');
            $this->stdout("\nContent and data and avatars directories deleted.\n", Console::FG_GREEN);
        } else {
            $this->stdout("Nothing was deleted - command interrupted.\n", Console::FG_GREEN);
        }
    }
public function actionClearAll ( ) { $ module = \ jacmoe \ mdpages \ Module :: getInstance ( ) ; if ( $ this -> confirm ( 'Delete content and data directories ?' ) ) { FileHelper :: removeDirectory ( Yii :: getAlias ( $ module -> pages_directory ) ) ; FileHelper :: removeDirectory ( Yii :: getAlias ( $ module -> flywheel_config ) ) ; FileHelper :: removeDirectory ( Yii :: getAlias ( '@app/web' ) . DIRECTORY_SEPARATOR . 'avatars' ) ; $ this -> stdout ( "\nContent and data and avatars directories deleted.\n" , Console :: FG_GREEN ) ; } else { $ this -> stdout ( "Nothing was deleted - command interrupted.\n" , Console :: FG_GREEN ) ; } }
Removes content and data directories
Removes content and data directories