Download the PHP package justinholtweb/craft-freelink without Composer

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

FreeLink for Craft CMS 5

A powerful, lightweight link field plugin for Craft CMS 5. Hybrid storage with proper element relations, 12 built-in link types, and migration paths from Hyper, Linkit, Typed Link Field, and native Craft Link fields.

Why FreeLink?

FreeLink takes a different approach to link fields:

Requirements

Installation

Configuration

Add a FreeLink field in Settings > Fields. The settings UI lets you:

Available Link Types

Type Handle Description
URL url Any URL with validation
Email email Email address (outputs mailto: links)
Phone phone Phone number (outputs tel: links)
SMS sms Phone number (outputs sms: links)
Custom custom Arbitrary value, no validation
Site site Relative path resolved against a site's base URL
Entry entry Craft entry element
Asset asset Craft asset element
Category category Craft category element
User user Craft user element
Product product Commerce product (requires Commerce)
Variant variant Commerce variant (requires Commerce)

Twig Usage

Single-Link Mode

The field value is a LinkCollection that transparently proxies to the first link:

Multi-Link Mode

Element Resolution

Element links (entry, asset, category, user, product, variant) resolve their target element automatically when you access it — no .with() needed:

Note: Because the field value is a LinkCollection value object (not a raw element list), it does not participate in Craft's .with([...]) eager loading. Don't pass a FreeLink field handle to .with() — element links resolve lazily on access instead.

Reverse Lookups

Find elements that link to a given element:

Conditionals

GraphQL

FreeLink fields return [FreeLinkInterface] (always an array; single-link mode returns an array of one).

Element API

FreeLink works out of the box with craftcms/element-api. Link and LinkCollection implement JsonSerializable, so field values serialize to clean JSON objects with resolved URLs, display text, and element metadata.

Single-link fields produce a JSON object:

Element link fields include additional metadata:

Multi-link fields produce an array of objects.

You can also call toApiArray() directly on any link for programmatic use:

Custom Link Types

Register custom link types via the EVENT_REGISTER_LINK_TYPES event:

Your custom type should extend justinholtweb\freelink\base\Link (for simple links) or justinholtweb\freelink\base\ElementLink (for element links), and implement the displayName() and handle() static methods.

Migrating from Other Plugins

FreeLink includes console commands to migrate data from four popular link plugins. Each command converts the field type, transforms content data, and creates relations table rows for element links.

Options

Flag Description
--field=<handle> Migrate a specific field only
--backup Create a full database backup before migrating
--dry-run Preview changes without applying them

Safety

Storage Architecture

Content Column (JSON)

Every link stores its metadata as JSON in the field's content column:

For element links, value is null in the JSON. The actual element reference lives in the relations table.

Relations Table (freelink_links)

Element link references are stored with proper foreign keys:

Column FK Target On Delete
fieldId fields.id CASCADE
ownerId elements.id CASCADE
ownerSiteId sites.id CASCADE
targetId elements.id SET NULL
targetSiteId sites.id SET NULL

This means:

License

This plugin requires a commercial license purchasable through the Craft Plugin Store.


All versions of craft-freelink with dependencies

PHP Build Version
Package Version
Requires php Version ^8.2
craftcms/cms Version ^5.0.0
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 justinholtweb/craft-freelink contains the following files

Loading the files please wait ...