richardhj / dc-general-single-model
This package is abandoned and no longer maintained.
No replacement package was suggested.
There is no license information available for the latest version (v1.0.0-beta.3) of this package.
DcGeneral DataProvider and View for single model DCAs.
Package info
github.com/richardhj/dc-general-single-model
Type:contao-module
pkg:composer/richardhj/dc-general-single-model
v1.0.0-beta.3
2016-10-11 13:16 UTC
Requires
- php: ^5.3 || ^7.0
- contao-community-alliance/dc-general: ^2.0
This package is auto-updated.
Last update: 2022-02-01 13:02:03 UTC
README
This package provides a data provider and view for the DcGeneral. You can use it if your dca has to handle one dataset exactly – if you do not need a list view, just the edit mask. It is great to get rid of the DC_File.
Install
Via Composer
$ composer require richardhj/dc-general-single-model
Usage
For extension developers.
DCA
Minimum dca configuration
/** * DCA */ $GLOBALS['TL_DCA'][$table] = [ // Config 'config' => [ 'dataContainer' => 'General', 'forceEdit' => true, ], 'dca_config' => [ 'data_provider' => [ 'default' => [ 'class' => 'DcGeneral\Data\SingleModelDataProvider', ], ], 'view' => 'DcGeneral\View\SingleModelView', ],
The extension create a database table (with key=>value structure) on its when using the database installer.
Model
A model for accessing data
namespace MagickImages\Model; use DcGeneral\Contao\Model\AbstractSingleModel; /** * @property string $implementation */ class Config extends AbstractSingleModel { /** * {@inheritdoc} */ protected static $strTable = 'tl_magickimages_config'; /** * {@inheritdoc} */ protected static $objInstance; }