Spatie\MediaLibrary\Commands\ClearCommand::getMediaItems PHP Метод

getMediaItems() публичный Метод

public getMediaItems ( ) : Illuminate\Database\Eloquent\Collection
Результат Illuminate\Database\Eloquent\Collection
    public function getMediaItems() : Collection
    {
        $modelType = $this->argument('modelType');
        $collectionName = $this->argument('collectionName');
        if (!is_null($modelType) && !is_null($collectionName)) {
            return $this->mediaRepository->getByModelTypeAndCollectionName($modelType, $collectionName);
        }
        if (!is_null($modelType)) {
            return $this->mediaRepository->getByModelType($modelType);
        }
        if (!is_null($collectionName)) {
            return $this->mediaRepository->getByCollectionName($collectionName);
        }
        return $this->mediaRepository->all();
    }