我可以通过在 pimcore 中生成一个对象文件夹Pimcore\Model\Object\Folder::create()
。不幸的是,没有这样的功能Asset\Folder
。
有没有人知道如何在不将其侵入数据库的情况下生成资产文件夹?
问问题
2958 次
2 回答
4
也可以使用
Asset\Service::createFolderByPath("/this/is/a/example/");
用于在资产目录中生成文件夹。优点是它递归地生成文件夹。
于 2019-07-10T09:44:54.853 回答
4
看看 Admin UI 是如何做到的:
/pimcore/modules/admin/controllers/AssetController.php / addFolderAction()第 331 行:
$asset = Asset::create($this->getParam("parentId"), array(
"filename" => $this->getParam("name"),
"type" => "folder",
"userOwner" => $this->user->getId(),
"userModification" => $this->user->getId()
));
于 2015-07-30T08:35:41.867 回答