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();
}