Download the PHP package samsonos/cms_input without Composer

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

SamsonCMS input module

This is base module for all cms input modules.

Usage

There are two main static functions, this module have:

Function create($dbObject, $type, $param = null, $className = CLASS) This function create and retrieves SamsonCMS input instance based on given parameters. As you can see first two are required, these are \samson\activerecord\dbRecord instance or it's ancestor and SamsonCMS input field type, this parameter should be int. Here is this list:

Field name Field identifier
Text 0
Resource 1
Date 2
Select 3
Table (deprecated) 4
Material 5
Number 6
WYSIWYG 7
Gallery (separate module) 8

The other parameters are not necessary. For example if you will not pass the $param to this function the ancestor class field will be used, and if it's not defined this class field will be used. The last parameter is for double or more nested classes. This functionality is not implemented yet.

Second function createFromMetadata($entity, $param, $identifier, $className = CLASS) is very similar to create() function except for first and third parameters, they are used to get \samson\activerecord\dbRecord instance.

Here are some examples how this functions can be used:

Other methods

There are also value(), save($value) and convert($value) functions. The first one returns SamsonCMS module value field. Function convert() does nothing but can be overridden to convert value before save. Function save() inserts value in \samson\activerecord\dbRecord object field and writes this object to database.

Be care not to be confused with __save() controller.

As this class is module it has __save() controller which can be called, for example, by URL '...samson_cms_input/save'. As you know each SamsonCMS module has it's id and 'samson_cms_input' can be replaced by it to perform ancestor controller.

This class implements \samson\core\iModuleViewable interface and should implement toView() function. Default there is default implementation in this module but it can be overridden in ancestor classes.

SamsonCMS official web-site


All versions of cms_input with dependencies

PHP Build Version
Package Version
Requires samsonos/js_core Version *
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 samsonos/cms_input contains the following files

Loading the files please wait ....