1
0
mirror of https://github.com/typemill/typemill.git synced 2025-08-06 14:16:46 +02:00

version 1.2.9

This commit is contained in:
Sebastian
2018-12-11 08:42:02 +01:00
parent e51bcbd208
commit 28b6f93a9c
7 changed files with 128 additions and 91 deletions

View File

@@ -3,6 +3,7 @@
namespace Typemill;
use \Symfony\Component\EventDispatcher\EventSubscriberInterface;
use Typemill\Models\Fields;
abstract class Plugin implements EventSubscriberInterface
{
@@ -84,4 +85,20 @@ abstract class Plugin implements EventSubscriberInterface
{
$this->container->assets->addInlineCSS($CSS);
}
protected function generateForm($pluginName)
{
$fieldsModel = new Fields();
$pluginDefinitions = \Typemill\Settings::getObjectSettings('plugins', $pluginName);
if(isset($pluginDefinitions['frontend']['fields']))
{
# get all the fields and prefill them with the dafault-data, the user-data or old input data
$fields = $fieldsModel->getFields($userSettings = false, 'plugins', $pluginName, $pluginDefinitions, 'frontend');
# use the field-objects to generate the html-fields
}
}
}