v7.0.0-beta.4 release
This commit is contained in:
@@ -3,6 +3,7 @@
|
||||
namespace App\Repositories;
|
||||
|
||||
use App\Contracts\Repositories\ModuleRepositoryInterface;
|
||||
use App\Enums\DeactivationReason;
|
||||
use App\Enums\ExtensionStatus;
|
||||
use App\Models\Module;
|
||||
use Illuminate\Database\Eloquent\Collection;
|
||||
@@ -326,4 +327,21 @@ class ModuleRepository implements ModuleRepositoryInterface
|
||||
return in_array($pluginIdentifier, $pluginDependencies);
|
||||
})->values();
|
||||
}
|
||||
|
||||
/**
|
||||
* 코어 버전 비호환으로 자동 비활성화된 모듈을 조회합니다.
|
||||
*
|
||||
* @return Collection 자동 비활성화된 모듈 컬렉션
|
||||
*/
|
||||
public function findAutoDeactivated(): Collection
|
||||
{
|
||||
if (! \Illuminate\Support\Facades\Schema::hasColumn('modules', 'deactivated_reason')) {
|
||||
return new Collection;
|
||||
}
|
||||
|
||||
return Module::where('status', ExtensionStatus::Inactive->value)
|
||||
->where('deactivated_reason', DeactivationReason::IncompatibleCore->value)
|
||||
->orderByDesc('deactivated_at')
|
||||
->get();
|
||||
}
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user