{"id":27078950,"url":"https://github.com/netlogix/netlogix.assetmetadata","last_synced_at":"2025-04-06T01:20:09.712Z","repository":{"id":40367030,"uuid":"391863627","full_name":"netlogix/Netlogix.AssetMetadata","owner":"netlogix","description":"Attach metadata objects to Neos Assets","archived":false,"fork":false,"pushed_at":"2023-11-20T11:09:54.000Z","size":39,"stargazers_count":0,"open_issues_count":0,"forks_count":0,"subscribers_count":4,"default_branch":"main","last_synced_at":"2025-03-19T23:45:39.494Z","etag":null,"topics":["assets","media","metadata","neos","neoscms"],"latest_commit_sha":null,"homepage":"","language":"PHP","has_issues":true,"has_wiki":null,"has_pages":null,"mirror_url":null,"source_name":null,"license":"mit","status":null,"scm":"git","pull_requests_enabled":true,"icon_url":"https://github.com/netlogix.png","metadata":{"files":{"readme":"README.md","changelog":null,"contributing":null,"funding":null,"license":"LICENSE","code_of_conduct":null,"threat_model":null,"audit":null,"citation":null,"codeowners":null,"security":null,"support":null}},"created_at":"2021-08-02T08:07:35.000Z","updated_at":"2023-03-29T19:37:19.000Z","dependencies_parsed_at":"2023-02-15T18:46:19.734Z","dependency_job_id":null,"html_url":"https://github.com/netlogix/Netlogix.AssetMetadata","commit_stats":null,"previous_names":[],"tags_count":5,"template":false,"template_full_name":null,"repository_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/netlogix%2FNetlogix.AssetMetadata","tags_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/netlogix%2FNetlogix.AssetMetadata/tags","releases_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/netlogix%2FNetlogix.AssetMetadata/releases","manifests_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/netlogix%2FNetlogix.AssetMetadata/manifests","owner_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners/netlogix","download_url":"https://codeload.github.com/netlogix/Netlogix.AssetMetadata/tar.gz/refs/heads/main","host":{"name":"GitHub","url":"https://github.com","kind":"github","repositories_count":247421082,"owners_count":20936224,"icon_url":"https://github.com/github.png","version":null,"created_at":"2022-05-30T11:31:42.601Z","updated_at":"2022-07-04T15:15:14.044Z","host_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub","repositories_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories","repository_names_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repository_names","owners_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners"}},"keywords":["assets","media","metadata","neos","neoscms"],"created_at":"2025-04-06T01:20:09.144Z","updated_at":"2025-04-06T01:20:09.702Z","avatar_url":"https://github.com/netlogix.png","language":"PHP","funding_links":[],"categories":[],"sub_categories":[],"readme":"# Netlogix.AssetMetadata\n\nThis package allows you to attach multiple metadata objects to an asset.\n\nAssets are automatically given the `Netlogix\\AssetMetadata\\Domain\\Model\\AssetMetadataAwareInterface` using an Aspect, so you can simply call `$asset-\u003egetMetadata('myMetadata')`.\n\n## Configuration / Usage\n\n1. Create a new Model with your desired properties that extends `Netlogix\\AssetMetadata\\Domain\\Model\\AssetMetadata`\n2. Configure the metadata:\n```yaml\nNetlogix:\n  AssetMetadata:\n    metadata:\n      'mymetadata':\n        label: 'My Metadata'\n        # Class that implements this Metadata. Must extend AssetMetadata\n        className: 'My\\Metadata\\Domain\\Model\\MyMetadata'\n        # Partial root path that contains the edit partial\n        editPartialRootPath: 'resource://My.Metadata/Private/Partials'\n        # Partial File to render in Asset Edit View\n        # Path must be Package/Resources/Private/Partials/AssetMetadata/\u003ceditPartialName\u003e.html\n        editPartialName: 'MyMetadata'\n        # Neos AssetSource identifiers to which this Metadata configuration should apply\n        # If this is unset, the Metadata will be applied to all AssetSources\n        assetSources: ['neos', 'my-special-asset-source']\n        # Optional position for ordering in the Edit View of an Asset\n        position: 'start'\n```\n3. Create the edit partial:\n```html\n\u003clabel for=\"mymetadata-fieldA\"\u003eField A\u003c/label\u003e\n\u003cf:form.textfield property=\"{metadataPropertyPath}.fieldA\" id=\"mymetadata-fieldA\" placeholder=\"Foo\" type=\"text\"/\u003e\n```\n4. Set the metadata `$asset-\u003esetMetadata('mymetadata', new MyMetadata('mymetadata', $asset))`\n5. Get the metadata `$asset-\u003egetMetadata('mymetadata')`\n","project_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fnetlogix%2Fnetlogix.assetmetadata","html_url":"https://awesome.ecosyste.ms/projects/github.com%2Fnetlogix%2Fnetlogix.assetmetadata","lists_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fnetlogix%2Fnetlogix.assetmetadata/lists"}