74 lines
1.6 KiB
PHP
74 lines
1.6 KiB
PHP
<?php
|
|
namespace Render3D\Form;
|
|
|
|
use Render3D\Module;
|
|
use Laminas\Form\Element;
|
|
use Laminas\Form\Form;
|
|
|
|
class Render3DBlockForm extends Form
|
|
{
|
|
public function init()
|
|
{
|
|
|
|
$this->add([
|
|
'name' => 'o:block[__blockIndex__][o:data][model_type]',
|
|
'type' => Element\Select::class,
|
|
'options' => [
|
|
'label' => 'Model type',
|
|
'info' => 'Please enter ...',
|
|
'value_options' => Module::MODEL_TYPES,
|
|
],
|
|
]);
|
|
|
|
$this->add([
|
|
'name' => 'o:block[__blockIndex__][o:data][width]',
|
|
'type' => Element\Select::class,
|
|
'options' => [
|
|
'label' => 'Width',
|
|
'value_options' => Module::MODEL_WIDTH,
|
|
],
|
|
]);
|
|
|
|
$this->add([
|
|
'name' => 'o:block[__blockIndex__][o:data][ratio]',
|
|
'type' => Element\Select::class,
|
|
'options' => [
|
|
'label' => 'Ratio',
|
|
'value_options' => Module::RATIO,
|
|
],
|
|
]);
|
|
|
|
$this->add([
|
|
'type' => Element\Checkbox::class,
|
|
'name' => 'o:block[__blockIndex__][o:data][renderSourceLink]',
|
|
'options' => [
|
|
'label' => 'Display a link to the item',
|
|
//'use_hidden_element' => true,
|
|
'checked_value' => true,
|
|
'unchecked_value' => false,
|
|
],
|
|
]);
|
|
|
|
/*
|
|
$this->add([
|
|
'type' => Element\Checkbox::class,
|
|
'name' => 'o:block[__blockIndex__][o:data][addPreLoadImage]',
|
|
'options' => [
|
|
'label' => 'Display the preload image',
|
|
//'use_hidden_element' => true,
|
|
'checked_value' => true,
|
|
'unchecked_value' => false,
|
|
],
|
|
]);
|
|
*/
|
|
|
|
$this->add([
|
|
'name' => 'o:block[__blockIndex__][o:data][title]',
|
|
'type' => Element\Text::class,
|
|
'options' => [
|
|
'label' => 'Sub-title',
|
|
]
|
|
]);
|
|
}
|
|
}
|