Skip to content
Viames Marino edited this page Feb 26, 2026 · 2 revisions

Pair framework: Image

Pair\Html\FormControls\Image renders <input type="image"> (submit button with image source), not an <img> tag.

Methods

  • render(): string
  • Inherited methods from FormControl: value(), id(), class(), data(), title().

Example

$imgSubmit = (new \Pair\Html\FormControls\Image('searchByImage'))
    ->value('/assets/img/search-button.png')
    ->title('Search');

echo $imgSubmit->render();

Notes

In HTML, input[type=image] typically uses src, while this control inherits value handling from FormControl. Verify generated markup against your frontend expectations.

See also: Button, File, FormControl.

Clone this wiki locally