Пример #1
0
 public static function uninstall()
 {
     foreach (self::getScopes() as $scope) {
         $model = new Model($scope);
         while ($model->getHighestCustomVarIndex()) {
             $model->removeCustomVariable();
         }
     }
 }
Пример #2
0
 public function testExecute_ShouldOutputErrorMessage_IfColumnsDoNotMatch()
 {
     $model = new Model(Model::SCOPE_PAGE);
     $model->removeCustomVariable();
     $this->assertContains('There is a problem with your custom variables configuration', $this->executeCommand());
 }
 private function dropCustomVar($scope)
 {
     $this->clearCache();
     $model = new Model($scope);
     $model->removeCustomVariable();
 }
 private function removeCustomVariables(Model $model, $numberOfVarsToRemove, OutputInterface $output)
 {
     for ($index = 0; $index < $numberOfVarsToRemove; $index++) {
         $indexRemoved = $model->removeCustomVariable();
         $this->progress->advance();
         $output->writeln('  <info>Removed a variable in scope "' . $model->getScopeName() . '" having the index ' . $indexRemoved . '</info>');
     }
 }