Inital commit

This commit is contained in:
2020-11-19 15:36:28 +01:00
parent 71f32f83d3
commit 66ce4ee218
18077 changed files with 2166122 additions and 35184 deletions

View File

@@ -8,6 +8,7 @@ use Symfony\Component\Routing\Router;
use Thelia\Core\HttpFoundation\Request;
use Thelia\Files\FileModelParentInterface;
use Thelia\Form\BaseForm;
use Thelia\Form\Definition\AdminForm;
use Thelia\Form\FolderImageModification;
use Thelia\Model\Base\FolderImage as BaseFolderImage;
use Propel\Runtime\Connection\ConnectionInterface;
@@ -93,19 +94,7 @@ class FolderImage extends BaseFolderImage implements BreadcrumbInterface, FileMo
*/
public function getUpdateFormId()
{
return 'thelia.admin.folder.image.modification';
}
/**
* Get the form instance used to change this object information
*
* @param \Thelia\Core\HttpFoundation\Request $request
*
* @return BaseForm the form
*/
public function getUpdateFormInstance(Request $request)
{
return new FolderImageModification($request);
return AdminForm::FOLDER_IMAGE_MODIFICATION;
}
/**
@@ -113,7 +102,14 @@ class FolderImage extends BaseFolderImage implements BreadcrumbInterface, FileMo
*/
public function getUploadDir()
{
return THELIA_LOCAL_DIR . 'media'.DS.'images'.DS.'folder';
$uploadDir = ConfigQuery::read('images_library_path');
if ($uploadDir === null) {
$uploadDir = THELIA_LOCAL_DIR . 'media' . DS . 'images';
} else {
$uploadDir = THELIA_ROOT . $uploadDir;
}
return $uploadDir . DS . 'folder';
}
/**
@@ -122,7 +118,7 @@ class FolderImage extends BaseFolderImage implements BreadcrumbInterface, FileMo
*/
public function getRedirectionUrl()
{
return '/admin/folder/update/' . $this->getFolderId();
return '/admin/folders/update/' . $this->getFolderId();
}
/**