Vsch\TranslationManager\Manager::clearErrors PHP Method

clearErrors() public method

public clearErrors ( )
    public function clearErrors()
    {
        $this->errors = [];
    }

Usage Example

 public function getImport()
 {
     $replace = \Request::get('replace', false);
     $group = \Request::get('group', '*');
     $this->manager->clearErrors();
     $counter = $this->manager->importTranslations($group === '*' ? $replace : ($this->manager->inDatabasePublishing() == 1 ? 0 : 1), $group === '*' ? null : [$group]);
     $errors = $this->manager->errors();
     return \Response::json(array('status' => 'ok', 'counter' => $counter, 'errors' => $errors));
 }