定制 netlogix/assetmetadata 二次开发

按需修改功能、优化性能、对接业务系统,提供一站式技术支持

邮箱:yvsm@zunyunkeji.com | QQ:316430983 | 微信:yvsm316

netlogix/assetmetadata

最新稳定版本:2.2.0

Composer 安装命令:

composer require netlogix/assetmetadata

包简介

Attach metadata objects to Neos Assets

README 文档

README

This package allows you to attach multiple metadata objects to an asset.

Assets are automatically given the Netlogix\AssetMetadata\Domain\Model\AssetMetadataAwareInterface using an Aspect, so you can simply call $asset->getMetadata('myMetadata').

Configuration / Usage

  1. Create a new Model with your desired properties that extends Netlogix\AssetMetadata\Domain\Model\AssetMetadata
  2. Configure the metadata:
Netlogix:
  AssetMetadata:
    metadata:
      'mymetadata':
        label: 'My Metadata'
        # Class that implements this Metadata. Must extend AssetMetadata
        className: 'My\Metadata\Domain\Model\MyMetadata'
        # Partial root path that contains the edit partial
        editPartialRootPath: 'resource://My.Metadata/Private/Partials'
        # Partial File to render in Asset Edit View
        # Path must be Package/Resources/Private/Partials/AssetMetadata/<editPartialName>.html
        editPartialName: 'MyMetadata'
        # Neos AssetSource identifiers to which this Metadata configuration should apply
        # If this is unset, the Metadata will be applied to all AssetSources
        assetSources: ['neos', 'my-special-asset-source']
        # Optional position for ordering in the Edit View of an Asset
        position: 'start'
  1. Create the edit partial:
<label for="mymetadata-fieldA">Field A</label>
<f:form.textfield property="{metadataPropertyPath}.fieldA" id="mymetadata-fieldA" placeholder="Foo" type="text"/>
  1. Set the metadata $asset->setMetadata('mymetadata', new MyMetadata('mymetadata', $asset))
  2. Get the metadata $asset->getMetadata('mymetadata')

统计信息

  • 总下载量: 2.93k
  • 月度下载量: 0
  • 日度下载量: 0
  • 收藏数: 0
  • 点击次数: 0
  • 依赖项目数: 0
  • 推荐数: 0

GitHub 信息

  • Stars: 0
  • Watchers: 3
  • Forks: 0
  • 开发语言: PHP

其他信息

  • 授权协议: Unknown
  • 更新时间: 2021-08-19