mobomo/media_acquiadam

Name: media_acquiadam

Owner: mobomo

Description: Drupal 8 webdam module

Created: 2017-06-27 19:31:13.0

Updated: 2017-10-23 11:22:53.0

Pushed: 2017-11-17 22:14:24.0

Homepage: null

Size: 331

Language: PHP

GitHub Committers

UserMost Recent Commit# Commits

Other Committers

UserEmailMost Recent Commit# Commits

README

Media: Acquia DAM

Build Status Coverage Status

About Media entity

Media entity provides a 'base' entity for a media element. This is a very basic entity which can reference to all kinds of media-objects (local files, YouTube videos, tweets, CDN-files, …). This entity only provides a relation between Drupal (because it is an entity) and the resource. You can reference to this entity within any other Drupal entity.

About Media entity webdam

This module provides Acquia DAM integration for Media entity (i.e. media type provider plugin). When a Acquia DAM asset is added to a piece of content, this module will create a media entity which provides a “local” copy of the asset to your site. These media entities will be periodically synchronized with Acquia DAM via cron.

Acquia DAM API

This module uses Acquia DAM's REST API to fetch assets and all the metadata. The Acquia DAM REST API client is provided by php-webdam-client At a minimum you will need to:

API authentication

This module uses 2 types of authentication as required by the Acquia DAM API. The root API credentials for your Acquia DAM account should be configured on the Acquia DAM config page (/admin/config/media/webdam). Individual Acquia DAM user accounts should be created for each Drupal user that needs to manage and use Acquia DAM assets. Users will be prompted for their Acquia DAM credentials upon accessing the Acquia DAM asset browser

Storing field values

If you want to store the fields that are retrieved from Acquia DAM you should create appropriate fields on the created media bundle (id) and map this to the fields provided by Acquia DAMAsset.php.

Asset status and expiration

If you want to use the Acquia DAM asset status and asset expiration functionality you should map the “Status” field to “Publishing status”

This would be an example of that (the field_map section):

code: en
us: true
ndencies:
dule:
- crop
- media_acquiadam
d_party_settings:
op:
image_field: field_file
webdam
l: Acquia DAM
ription: 'Acquia DAM media assets to be used with content.'
: webdam_asset
_configuration:
urce_field: field_asset_id
d_map:
scription: field_description
le: field_file
pe_id: field_type_id
lename: field_filename
lesize: field_filesize
dth: field_width
ight: field_height
letype: field_filetype
lorspace: field_colorspace
rsion: field_version
tecreated: created
temodified: changed
tecaptured: field_captured
lderID: field_folder_id
atus: status

Project page: http://drupal.org/project/media_acquiadam

Maintainers:

Step-by-step setup guide

This guide provides an example for how to implement the media_acquiadam module on your Drupal 8 site.

Module installation

Download and install the media_acquiadam module and all dependencies. See here for help with installing modules.

Configure Acquia DAM API credentials and Cron settings

You acquiadam API credentials and Cron settings should be configured at /admin/media/config/acquiadam. This module uses cron to periodically synchronize the mapped media entity field values with acquiadam. The synchronize interval will be dependent on how often your site is configured to run cron.

Create Media Bundle for acquiadam assets

Add a new media bundle (admin/structure/media/add) which uses “Acquia DAM Asset” as the “Type Provider”.

Add a field to store the Acquia DAM asset ID

Add a field to your newly created media bundle for storing the Acquia DAM Asset ID. The Asset ID field type should be “Number -> Number (integer)” and it should be limited to 1 value. The Asset ID field should not be configured with a “Default value”, “Minimum”, “Maximum”, “Prefix”, or “Suffix”

Add a field to store the Acquia DAM asset file

Add a field to your newly created media bundle for storing the Acquia DAM Asset File. The Asset file field type should be “Reference -> File” and it should be limited to 1 value.

Optionally add fields to store Acquia DAM asset metadata

Additional fields may be added to store the Acquia DAM asset metadata. Here is a list of metadata fields which can be mapped by the “Acquia DAM Asset” type provider and the recommended field type.

Configure field mapping for media bundle fields

Return to the media bundle configuration page and set the field mappings for the fields that you created. When a Acquia DAM asset is added to a piece of content, this module will create a media entity which provides a “local” copy of the asset to your site. When the media entity is created the Acquia DAM values will be mapped to the entity fields that you have configured. The mapped field values will be periodically synchronized with Acquia DAM via cron.

Asset status

If you want your site to reflect the Acquia DAM asset status you should map the “Status” field to “Publishing status” in the media bundle configuration. This will set the published value (i.e. status) on the media entity that gets created when a Acquia DAM asset is added to a piece of content. This module uses cron to periodically synchronize the mapped media entity field values with acquiadam.

Date created and date modified

If you want your site to reflect the Acquia DAM values for when the asset was created or modified you should map the “Date created” field to the “Created” and the “Date modified” field to “Changed” in the media bundle configuration. This will set the “created” and “changed” values on the media entity that gets created when a Acquia DAM asset is added to a piece of content. This module uses cron to periodically synchronize the mapped media entity field values with Acquia DAM.

Crop configuration

If you are using the Crop module on your site, you should map the “Crop configuration -> Image field” to the field that you created to store the Acquia DAM asset file.

Configure an Entity Browser for Acquia DAM

In order to use the Acquia DAM asset browser you will need to create a new entity browser or add a Acquia DAM widget to an existing entity browser (/admin/config/content/entity_browser).

Add a media field

In order to add a Acquia DAM asset to a piece of content you will need to add a media field to one of your content types.

WYSIWYG configuration

The media entity module provides a default embed button which can be configured at /admin/config/content/embed. It can be configured to use a specific entity browser and allow for different display modes.


This work is supported by the National Institutes of Health's National Center for Advancing Translational Sciences, Grant Number U24TR002306. This work is solely the responsibility of the creators and does not necessarily represent the official views of the National Institutes of Health.