Download the PHP package pstaender/kirby-uri-field without Composer

On this page you can find all versions of the php package pstaender/kirby-uri-field. 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 kirby-uri-field

kirby-link-field

Kirby 3 Field for links of any kind - external, page, file, email, phone. Has settings for text, popup true/false, and hash. Original plugin is this, created by Thomas Günther.

The plugin uses the native Kirby fields for pages, files, url, email, and tel:

If used inside a structure field, link fields get a nice preview. Links to pages and files get the native page/file preview:

Installation

With Composer:

...or check out other plugin installation methods.

Blueprint

Add a field and set its type to link:

To define what link types you want, use options. Possible values are url, page, file, email, and tel:

By default, you can also specify link text, popup true/false, and hash. You can disable those options or change their appearance by using the settings value:

To disable settings altogether, set:

You could also apply such settings globally:

config/config.php

...or:

Pages/Files Settings

You could specify settings for the pages/files field. For example:

Usage

To render the links, use the provided toLinkObject() method. It returns an instance of the Link class.

Let's say you have a field with the following values:

$link->url()

Returns the link URL, including the hash:

Note: For email and tel links, the value is null since they're not actual links.

$link->href()

Returns link href:

If the link type is email or tel, it has mailto: or tel: accordingly.

Note: This is automatically called when you try to convert the class to string, meaning that:

...is the same as:

$link->attr([$attributes])

Returns the link attributes, merged with the optional $attributes:

$link->tag([$attributes])

Returns a full <a> tag with merged attributes from the optional $attributes:

$link->title()

Returns either the link text, page title, file title, filename, or finally the value. Used to generate the link text for the tag() method.

Retrieving Properties

You can get the properties of a link by invoking them as a method:

Migrating From URL Fields

If you've previously used a URL field:

...you could simply change it to:

...and it'll work. Also, the toLinkObject() method can handle both link formats in your TXT files. It's the same if you have:

...or:


All versions of kirby-uri-field with dependencies

PHP Build Version
Package Version
Requires getkirby/cms Version ^3.7
getkirby/composer-installer Version ^1.1
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 pstaender/kirby-uri-field contains the following files

Loading the files please wait ....