PHPackages                             orange-hive/simplyment - PHPackages - PHPackages  [Skip to content](#main-content)[PHPackages](/)[Directory](/)[Categories](/categories)[Trending](/trending)[Leaderboard](/leaderboard)[Changelog](/changelog)[Analyze](/analyze)[Collections](/collections)[Log in](/login)[Sign up](/register)

1. [Directory](/)
2. /
3. [Framework](/categories/framework)
4. /
5. orange-hive/simplyment

ActiveTypo3-cms-extension[Framework](/categories/framework)

orange-hive/simplyment
======================

Simplified Development for TYPO3 developers

2.0.4(1y ago)61.1kGPL-2.0-or-laterPHPPHP ^8.0

Since Feb 9Pushed 1y ago3 watchersCompare

[ Source](https://github.com/orange-hive/simplyment)[ Packagist](https://packagist.org/packages/orange-hive/simplyment)[ Docs](https://technology.orangehive.de)[ RSS](/packages/orange-hive-simplyment/feed)WikiDiscussions master Synced 1mo ago

READMEChangelogDependencies (1)Versions (20)Used By (0)

Simplyment - simplified development
===================================

[](#simplyment---simplified-development)

The aim of this extension is to spend less time on configuring, setting up and jumping around in your TYPO3 extension code for doing common tasks.
Some things are simplified by having conventions where to store e.g. backend layouts or by using PHP attributes on your classes and properties, making development of extensions simpler.
More time for concentrating on the interesting parts like writing logic and getting development speeded up!

Requirements
------------

[](#requirements)

- PHP 8.0 or newer
- TYPO3 11.5

Installation
------------

[](#installation)

- Install the extension with Composer - dependency name: **orange-hive/simplyment**

Configuration
-------------

[](#configuration)

Include static "Simplyment" in your Template before loading the static typoscript for defining your page configuration typoscript
if you want to use BackendLayout and Frontend Template loading of Simplyment. This already defines a page=PAGE and uses 10 = FLUIDTEMPLATE.
If you want to define the page object on your own you can use the Template autoloading based on the backend layout name
using the following code for *templateName*:

```
templateName < simplyment.page.resolveTemplateName

```

Add the following code in your extension - that's all!:

- file Configuration/Services.yaml

```
services:
  MyVendorName\MyExtensionKey:
    tags:
      - name: simplyment
```

*Alternatively you can skip the registration in Configuration/Services.yaml and manually register your extension for usage with Simplyment:*

- *file: ext\_localconf.php*

```
\OrangeHive\Simplyment\Loader::extLocalconf(
  vendorName: 'MyVendorName',
  extensionName: 'my_extension_key'
);
```

- *file: ext\_tables.php*

```
\OrangeHive\Simplyment\Loader::extTables(
  vendorName: 'MyVendorName',
  extensionName: 'my_extension_key'
);
```

*As a third argument you could add *loaders* as an array containing the loaders you want to use. If no loaders are defined all loaders will be used.*

Usage
-----

[](#usage)

### BackendLayouts

[](#backendlayouts)

Loader: BackendLayoutLoader

You can create BackendLayout definitions by creating a TypoScript file with the extension: .ts, .tsconfig, .typoscript or .txt
in your extension directory *EXT:&lt;MY\_EXTENSION&gt;\\Resources\\Private\\BackendLayouts*.
The filename has to be written lower\_snake\_case.
In the file use the following structure:

```
{
    title = My title
    description = My template description
    icon = EXT:my_extension/Resources/Public/Images/BackendLayouts/default.png
    config {
        backend_layout {
            colCount = 1
            rowCount = 1
            rows {
                1 {
                    columns {
                        1 {
                            name = LLL:EXT:my_extension/Resources/Private/Language/locallang_be.xlf:backend_layout.column.normal
                            colPos = 0
                        }
                    }
                }
            }
        }
    }
}

```

For the properties *title* and *description* you can use LLL-notation for using localized translations.

The frontend template is automatically determined by your TemplatesRootPath directory.
The filename of your template file has to be equal to your BackendLayout file name but with using UpperCamelCase instead of lower\_snake\_case!

### Plugins

[](#plugins)

Loader: PluginLoader

You can register a new Plugin directly on your ActionController with the PHP attribute **Plugin**. Plugin actions can be added with adding the PHP attribute **PluginAction** at the action methods.

#### Adding FlexForm to your plugin

[](#adding-flexform-to-your-plugin)

FlexForms can be easily added to your Plugin using the **flexFormPath** property in the **Plugin** PHP attribute. The value of this property has to be a string starting with *EXT:* and defining the path to your FlexForm XML file. If no FlexForm has been defined Simplyment tries to find a FlexForm file in the location *EXT:my\_extension/Configuration/FlexForms/MyPluginName.xml* and adds this automatically.

For using this functionality add the following code to the file *TCA/Overrides/tt\_content.php* in your extension:

```
\OrangeHive\Simplyment\Loader::tcaTtContentOverrides('MyVendorName', 'my_extension_key');
```

### Database models

[](#database-models)

Loader: DatabaseModelLoader

Register a new database model with the PHP attribute **DatabaseTable**. Properties of the model which should be persisted to the database table have to receive the PHP attribute **DatabaseField** defining the field type.

For generating the TCA add the PHP attribute **TcaField** to your property.
You can additionally add the PHP attribute **Tca** to your class for defining the following options:

- icon: string containing the path to your custom icon for the model, if none is provided the Simplyment extension icon will be used
- allowOnStandardPage: boolean - allow table entries to be added on standard pages and not only in folders, default: false
- config: array - global TCA configuration, can override every TCA value of this model

For the TCA configuration of your new database model the TCA file is automatically generated by Simplyment in **Configuration/TCA/**on cache clear if not already existent containing the following content:

```
