【问题标题】:How to tag a Nuxeo document via nuxeo/nuxeo-php-client如何通过 nuxeo/nuxeo-php-client 标记 Nuxeo 文档
【发布时间】:2021-05-13 07:42:59
【问题描述】:

我正在使用 symfony 项目的依赖项 'nuxeo/nuxeo-php-client'。 自 2 天以来,我一直在尝试向 Nuxeo 文档添加标签。 我成功设置了字符串类型的属性,但标签是数组类型,文档非常小,因为它是社区维护的依赖项。

如果有人知道用数组设置类似属性的标签的语法,欢迎提供任何帮助!

谢谢。

设置字符串类型属性的语法:

$this->client->automation('Document.Update')->param('properties','dc:title=Mon nouveau titre')->input($nuxeoDocument->getUid())->execute();

【问题讨论】:

    标签: php symfony automation tags nuxeo


    【解决方案1】:

    您可能会发现 this answer 相关。它使用的是 v1.5,但可以轻松修改为 2.0+:

    $answer = $client
      ->operation()
      ->input('doc:/default-domain/workspaces/Default Workspace')
      ->param('type', 'Article')
      ->param('name', 'doc01')
      ->param('properties', 'dc:title=doc01 article:exampleList=[{"field01":"val001","field02":"val002","field03":"val003"}]')
      ->execute('Document.Create');
    

    注意:我没有测试代码,我这里直接修改,可能有错别字。

    【讨论】:

      猜你喜欢
      • 1970-01-01
      • 1970-01-01
      • 1970-01-01
      • 1970-01-01
      • 1970-01-01
      • 1970-01-01
      • 2014-10-11
      • 1970-01-01
      • 2023-04-02
      相关资源
      最近更新 更多