<?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\Number::class, 'options' => [ 'label' => 'Width in pixels', ], 'attributes' => [ 'min' => '100', ], ]); $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([ 'name' => 'o:block[__blockIndex__][o:data][title]', 'type' => Element\Text::class, 'options' => [ 'label' => 'Sub-title', ] ]); } }