Skip to content
Snippets Groups Projects
Commit 2e857039 authored by Vadim Justus's avatar Vadim Justus
Browse files

Update ApplyMediaFiles logic

parent 7a067ec3
No related branches found
No related tags found
1 merge request!19Merge current development to 1.2 version
......@@ -28,12 +28,12 @@ class ApplyMediaFiles
*/
public function execute(EntryInterface $entry): void
{
if ($entry[EntryInterface::MEDIA_DIRECTORY] === null) {
if ($entry->getMediaDirectory() === null) {
return;
}
$sourceDirPath = $entry[EntryInterface::MEDIA_DIRECTORY];
foreach ($entry[EntryInterface::MEDIA_FILES] as $fileName) {
$sourceDirPath = $entry->getMediaDirectory();
foreach ($entry->getMediaFiles() as $fileName) {
$this->copyFile($sourceDirPath, $fileName);
}
}
......
0% Loading or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment