Download the PHP package phil/field-layout without Composer

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

phil/field-layout

Lay out edit forms in tabs and quarter-width rows, with per-placement texts and show or lock conditions the server enforces on every submit.

phil/field-layout describes how an edit form is laid out, apart from the fields themselves: tabs, rows of four quarters, a label, instructions, a tip and a warning for each placement, and the conditions under which a placement is shown and editable. A field may be placed twice, each placement under a handle of its own; a set of placements — an address — may be imported several times, each time under a prefix.

The layout is declared by PHP attributes on a class, or by a definition as arrays, as a YAML or JSON file gives it. The conditions are rules of the JsonLogic subset of phil/form-logic, checked when the layout is built: a condition reads only the handles placed before it and the context variables the layout declares, such as whether the person editing is staff, so one pass in reading order decides every placement.

The browser may replay the conditions to show, hide and lock fields as the form is filled; the server decides again whatever the browser sent. LayoutJudge gives the state of each placement — editable, read-only or hidden — and the values to validate and write: a hidden placement is neither validated nor written unless it is always saved, and a read-only placement keeps its stored value whatever was submitted.

It is a plain PHP library, on phil/form-logic.

Status

Part State
Tabs, placements, widths in quarters, rows, texts per placement, a field placed twice Implemented and tested
Field sets imported under a prefix, their conditions renamed Implemented and tested
The definition as arrays, read strictly and bounded, and written back Implemented, tested and fuzzed
The layout declared by attributes Implemented and tested
Conditions to show and to edit a placement, their reading order, their types Implemented and tested
The server's decision on a submission Implemented and tested

Documentation

Document What it covers
Installation Requirements and installing.
Layouts Tabs, placements, widths, texts, handles, field sets, attributes and the definition as arrays.
Conditions and submissions Showing and locking placements, the context, the reading order, the browser and the server's decision.
Extension points What an application may replace or add, and when it is stable.
Testing The package's tests, its fuzz target and its benchmark.
Reference Every public type, with its role.

Quick start

Requirements

PHP 8.5 or later with ext-mbstring.

Contributing

Contributions are welcome on the PHIL monorepo: read the contribution guide and the security policy explains, never in a public issue.

License

MIT, © Philippe Gamache, doing business as Le Gnome Archiviste; a Parler Haut Interagir Librement project. See LICENSE.


All versions of field-layout with dependencies

PHP Build Version
Package Version
Requires php Version >=8.5
ext-mbstring Version *
phil/form-logic Version ^0.1@dev
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 phil/field-layout contains the following files

Loading the files please wait ...