Download the PHP package vaersaagod/assetmate without Composer

On this page you can find all versions of the php package vaersaagod/assetmate. 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 assetmate

AssetMate plugin for Craft CMS

Protect your assets, mate!

Requirements

This plugin requires Craft CMS 5.0.0+ and PHP 8.2+.

Installation

To install the plugin, follow these instructions:

  1. Install with composer via composer require vaersaagod/assetmate from your project directory.
  2. Install the plugin in the Craft Control Panel under Settings → Plugins, or from the command line via ./craft install/plugin assetmate.

Configuring

AssetMate can be configured by creating a file named assetmate.php in your Craft config folder, and overriding settings as needed.

Console commands

AssetMate adds a couple of asset-related CLI utility commands:

Purging "unused" assets

An "unused" asset is an asset that isn't a target in any element relations (i.e. has no source relations), and is also not found in any reference tags in database content tables (meaning it's not linked to or used in Redactor/CKEditor/LinkMate fields).

To delete all unused assets:

php craft assetmate/purge

Options

--volume (string, default '*')

Only purge assets in a specific volume, e.g. php craft assetmate/purge --volume=images

--kind (string, default '*')

Only purge assets with a specific file kind, e.g. php craft assetmate/purge --kind=image

--lastUpdatedBefore (string|int|bool, default 'P30D')

By default, AssetMate will not purge assets with a dateUpdated timestamp later than 30 days ago. This option can be set to an integer (i.e. number of seconds), a valid PHP date interval string, or false to disable the dateUpdated check entirely.

--searchContentTables (bool, default true)

In addition to checking the relations table for assets without any source element relations, AssetMate will search content tables to make sure that the assets found aren't referenced in text columns (e.g. in reference tags in Redactor or CK Editor). This can take a long time if there are a lot of assets and/or content, so if you're confident that you have no asset references in text fields, set this option to false to bypass content table searching altogether.

--searchContentTablesBatchSize (int, default 500)

After querying for assets without any source element relations, AssetMate will search for these assets across text columns in content tables. To speed up this lengthy process, the IDs are batched. If you're running into a PDO exception "Timeout exceeded in regular expression match", consider setting the batch size to a lower value.

--deleteEmptyFolders (bool, default true)

If true, AssetMate will scan for and delete any empty folders after purging unused assets. If the --volume option is used, only empty folders in that volume will be deleted.

Purging empty folders

An empty folder is a folder that doesn't contain any assets (or any sub folders that contain assets).

To delete all empty folders:

php craft assetmate/purge/folders

Options

--volume (string, default '*')

Only delete empty folders in a specific volume, e.g. php craft assetmate/purge/folders --volume=images


Price, license and support

The plugin is released under the MIT license. It's made for Værsågod and friends, and no support is given. Submitted issues are resolved if it scratches an itch.

Changelog

See CHANGELOG.MD.

Credits

Brought to you by Værsågod

Icon designed by Freepik from Flaticon.


All versions of assetmate with dependencies

PHP Build Version
Package Version
Requires php Version ^8.2
craftcms/cms Version ^5.0.0-beta.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 vaersaagod/assetmate contains the following files

Loading the files please wait ....