Download the PHP package flownative/neos-canto without Composer

On this page you can find all versions of the php package flownative/neos-canto. It is possible to download/install these versions without Composer. Possible dependencies are resolved automatically.

FAQ

After the download, you have to make one include require_once('vendor/autoload.php');. After that you have to import the classes with use statements.

Example:
If you use only one package a project is not needed. But if you use more then one package, without a project it is not possible to import the classes with use statements.

In general, it is recommended to use always a project to download your libraries. In an application normally there is more than one library needed.
Some PHP packages are not free to download and because of that hosted in private repositories. In this case some credentials are needed to access such packages. Please use the auth.json textarea to insert credentials, if a package is coming from a private repository. You can look here for more information.

  • Some hosting areas are not accessible by a terminal or SSH. Then it is not possible to use Composer.
  • To use Composer is sometimes complicated. Especially for beginners.
  • Composer needs much resources. Sometimes they are not available on a simple webspace.
  • If you are using private repositories you don't need to share your credentials. You can set up everything on our site and then you provide a simple download link to your team member.
  • Simplify your Composer build process. Use our own command line tool to download the vendor folder as binary. This makes your build process faster and you don't need to expose your credentials for private repositories.
Please rate this library. Is it a good library?

Informations about the package neos-canto

MIT license Packagist

Canto adaptor for Neos

This Flow package allows you to use assets (ie. pictures and other documents) stored in Canto in your Neos website as if these assets were native Neos assets.

About Canto

Canto offers a extensive solutions for digital asset management. The software makes working with pictures, graphics and video files easier.

Key Features

Installation

The Canto connector is installed as a regular Flow package via Composer. For your existing project, simply include flownative/neos-canto into the dependencies of your Flow or Neos distribution:

Enabling Canto API access

  1. In Canto go to Settings > Configuration Options > API > API Keys
  2. Click "Create API Key"
  3. Fill in a name that helps you understand what the key is for
  4. Fill in the "Redirect URL", using https://<www.your-site.com>/flownative-canto/authorization/finish, using your own domain(!)
  5. Note down "App ID", "App Secret" and "Website" of the new key

Allow client credentials mode for API key

To be able to use the Canto connection from the command line or to use the webhook feature described below, client credentials mode must be enabled.

  1. In Canto go to Settings > Configuration Options > API > API Keys
  2. Edit the API key you use for the Neos integration
  3. Enable "Support Client Credentials Mode" and click "Save"

Configure the Canto connection

You need to set the "App ID" and "App Secret" from the generated API key as well as the URLs you are using to access Canto (since they depend on your setup.)

The URLs are a base URI built using the "Website" value appended with api/v1 and an URI used for authentication that uses the top-level domain of the "Website" in https://oauth.canto.global/oauth/api/oauth2.

Set those values using the environment variables

or directly in Settings.yaml

and Objects.yaml

Using the Canto asset source in Neos

In the Media module you should see two asset sources, one called "Neos" and one called "Canto". If you switch to the Canto asset source and are not yet (or no longer) logged in to Canto, you will be redirected to the Canto login and asked to authorize access for Neos. After a redirect back to Neos you can now browse/search Canto and use assets from it in Neos as usual.

Custom Field mapping from Canto to Neos

Canto offers "custom fields" to add arbitrary data to assets. Those can be mapped to asset collections and tags in Neos, to make them visible for the users.

The configuration for this looks like that:

Note: Right now ths feature only makes sense if both asAssetCollection and valuesAsTags are set to true.

Note: The asset collections and tags must be created manually on the Neos side (for now.)

Change notification from Canto

The package provides webhooks that can be used to notify of changes in Canto.

When assets in Canto are modified, those hooks trigger the needed update on the Neos side.

Enabling webhooks in Canto

  1. In Canto go to Settings > Configuration Options > API > Webhooks
  2. Generate some random string for use as "Secure Token"
  3. Configure webhooks for "Update Metadata", "Add New Version"
    1. Use the matching URL for each hook as shown below
    2. Chose JSON as "Content Type"
    3. Fill in the "Secure Token"
    4. Click "Add"
Event Webhook URL (path)
Update Metadata /flownative-canto/webhook/update
Add New Version /flownative-canto/webhook/add

Note: The webhook URL must be prefixed with the publicly accessible hostname of your Neos instance, and HTTPS should be used to secure the secure token!

Configure secure token in Neos

Set the "Secure Token" value using the environment variable

or directly in Settings.yaml

Cleaning up unused assets

Whenever a Canto asset is used in Neos, the media file will be copied automatically to the internal Neos asset storage. As long as this media is used somewhere on the website, Neos will flag this asset as being in use. When an asset is not used anymore, the binary data and the corresponding metadata can be removed from the internal storage. While this does not happen automatically, it can be easily automated by a recurring task, such as a cron-job.

In order to clean up unused assets, simply run the following command as often as you like:

If you'd rather like to invoke this command through a cron-job, you can add two additional flags which make this command non-interactive:

Credits and license

This plugin was sponsored by Paessler and its initial version was developed by Robert Lemke and Karsten Dambekalns of Flownative.

See LICENSE for license details.


All versions of neos-canto with dependencies

PHP Build Version
Package Version
Requires php Version ^8.0
ext-json Version *
neos/flow Version 7.0 || ^8.0 || ^9.0 || dev-main
neos/media Version ^7.0 || ^8.0 || ^9.0 || dev-main
guzzlehttp/guzzle Version ^6.5.8 || ^7.4.5
behat/transliterator Version ~1.0
flownative/oauth2-client Version ^4.0.2
Composer command for our command line client (download client) This client runs in each environment. You don't need a specific PHP version etc. The first 20 API calls are free. Standard composer command

The package flownative/neos-canto contains the following files

Loading the files please wait ....