Vimeo-omeka-module/src/Form/VimeoBlockForm.php

43 lines
874 B
PHP

<?php
namespace Vimeo\Form;
use Vimeo\Module;
use Laminas\Form\Element;
use Laminas\Form\Form;
class VimeoBlockForm extends Form
{
public function init()
{
$this->add([
'name' => 'o:block[__blockIndex__][o:data][width]',
'type' => Element\Select::class,
'options' => [
'label' => 'Width',
'value_options' => Module::IMAGE_WIDTH,
],
]);
$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',
]
]);
}
}