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

43 lines
874 B
PHP
Raw Normal View History

2021-07-18 20:58:50 +02:00
<?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,
],
2021-07-18 20:58:50 +02:00
]);
$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',
]
]);
}
}