Download the PHP package fiedsch/contao-components without Composer

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

Components for Contao

Abandoned! Please use fiedsch/contao-jsonwidget instead.

Widgets

JSON widget

The jsonWidget can be used in DCA files to create a text field that contains a JSON string. While saving it will be checked if that the string is valid JSON. The widget displays the JSON string with JSON_PRETTY_PRINT so that checks by the reader are are easier.

Example: extending Members

Other valid options in eval are the same as for textareas (as WidgetJSON extends TextArea), except that setting rte will be ignored because the editors provided do not make sense here.

How to use that?

Extend tl_member as in the above example. Then create an ExtendedMemberModel that extends Contao's MemberModel. In the magic methodd __set() and _get you can intercept the "fields" stored in json_data. The Fiedsch\JsonGetterSetterTrait takes care of that:

And finally ...

Helper Classes

Reading YAML config files (mostly experimental)

If files/config/config.yml does not exist it will be created with the data specified in (the optional parameter) $defaults:

Use the YamlConfigHelper instance $config like so:

Let's say that as expected files/config/config.yaml exists and contains

You would get

with the data in $defaults being ignored. There will be no merge of what is read from the config file and the specified $defaults!

For details using Symfony's ExpressionLanguage see http://symfony.com/doc/current/components/expression_language.html

Specifying a default

With the config data as above:

Data types

with the configuration file as above

returns a stdClass Instance. If you need the data as an array, you have to type cast to array

Please note

Using

please note that file.yaml is publicly accessible (in Contao 3) unless some folder along the path files/sompe/path/to/a/ is protected by a .htaccess file (the lock icon in the Contao backend).

If you want to make the file editable for Contao backend users:


All versions of contao-components with dependencies

PHP Build Version
Package Version
Requires php Version >=5.6
contao/core-bundle Version ~3.5 || ~4.4
contao-community-alliance/composer-plugin Version ~2.4 || ~3.0
symfony/yaml Version ~2.7 || ~2.8 || ~3.2 || ~3.4
symfony/expression-language Version ~2.7 || ~2.8 || ~3.2 || ~3.4
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 fiedsch/contao-components contains the following files

Loading the files please wait ....