Download the PHP package samsoncms/api without Composer
On this page you can find all versions of the php package samsoncms/api. It is possible to download/install these versions without Composer. Possible dependencies are resolved automatically.
Download samsoncms/api
More information about samsoncms/api
Files in samsoncms/api
Package api
Short Description SamsonCMS API module
License Open Software License (OSL) v 3.0
Homepage http://samsonos.com/
Informations about the package api
SamsonCMS API module
SamsonCMS API for interaction with materials, fields and structures.
Additional fields table
After creating corresponding [Table structure]() and setting its [Additional fields]() you can get additional fields table object() ancestor for a specific ancestor you need to create class that extends generated additional fields table:
This class will contain generated generic methods for retrieving collection of table column values with according field name, for example if you have additional field with name method would be generated to get collection of values in all table rows.
Rendering custom additional field tables
[SamsonCMS]() will generate all created [Table structure]() automatically to simplify your code creation, the only thing that needs to be done is extending this generated classes and creating a views for outputting.
Remember is dependent on instance and uses it for rendering its views, so the path to views and views themselves should be located within this instance.
Default index view file
By default index view renders all rendered rows into view variable with name stored in - :
Default row view file
By default ancestor view object is stored in - :
Give a type hint to a generated ancestor and IDE will help outputting needed row data.
Navigation
Material
Added method for creating/updating material additional fields
Method find Field record in database by Field identifier and the receives its type for correct storing of additional field value.
Field
You can find additional field object by using one of provided methods:
- By its identifier
- By its name
- By its name or identifier
All this methods requires first argument instance for performing database queries.
Regular usage example:
Last argument is optional and should be used for simple and beautiful condition creation:
Field value
All versions of api with dependencies
samsonos/php_activerecord Version *
samsonphp/generator Version *
samsonphp/view Version *