Directory 在pimcore中生成资产文件夹
我可以通过Directory 在pimcore中生成资产文件夹,directory,assets,pimcore,Directory,Assets,Pimcore,我可以通过pimcore\Model\Object\folder::create()在pimcore中生成一个对象文件夹。不幸的是,Asset\Folder 有人知道如何在不将资产文件夹侵入数据库的情况下生成资产文件夹吗?看看管理员界面是如何在: 第331行: $asset = Asset::create($this->getParam("parentId"), array( "filename" => $this->getParam("name"), "typ
pimcore\Model\Object\folder::create()
在pimcore中生成一个对象文件夹。不幸的是,Asset\Folder
有人知道如何在不将资产文件夹侵入数据库的情况下生成资产文件夹吗?看看管理员界面是如何在: 第331行:
$asset = Asset::create($this->getParam("parentId"), array(
"filename" => $this->getParam("name"),
"type" => "folder",
"userOwner" => $this->user->getId(),
"userModification" => $this->user->getId()
));
也可以使用
Asset\Service::createFolderByPath("/this/is/a/example/");
用于在资产目录中生成文件夹。优点是它可以递归地生成文件夹。Ah,“type”是我所缺少的。非常感谢@chluehr如何在创建文件夹时添加元数据?我不想打DB两次。