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

45 lines
880 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\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',
]
]);
}
}