Tiger_View_Helper_MediaField

@api · extends Zend_View_Helper_Abstract

Tiger_View_Helper_MediaField — a form field that picks media via TigerMediaPicker.

Renders a hidden input (holding the selected media_id, or a comma list when multiple) plus a live preview and Choose/Clear buttons. The picker JS (tiger.media-picker.js, loaded by the admin layout) auto-wires it — no per-field script.

<?= $this->mediaField('hero_image', $page->hero_image, ['kind' => 'image', 'label' => 'Hero image']) ?>

Options: kind (restrict type), multiple (bool), label, id.

Methods

mediaField()

mediaField($name, $value = '', array $options = [])

Render a media-picker form field (hidden input + live preview + Choose/Clear buttons).

  • $name string — the form field name (also the default id)
  • $value string — the current media_id (or a comma list when multiple)
  • $options array — kind, multiple (bool), label, id

Returns string — the field's HTML markup