AttrEditorBinary
extends AttrEditor
in package
Specialised input field for page attributes
Table of Contents
Methods
- javascript() : mixed
- If you have any custom javascript to run, return it using this method.
- needs() : mixed
- If your class has script needs, load them in here.
- render() : mixed
- Return HTML for editing the attribute.
Methods
javascript()
If you have any custom javascript to run, return it using this method.
public
javascript(mixed $val, mixed $attr_name) : mixed
When your script runs, take a look at the $outer variable.
Parameters
- $val : mixed
- $attr_name : mixed
needs()
If your class has script needs, load them in here.
public
needs() : mixed
This is run on page load, not on ajax request.
render()
Return HTML for editing the attribute.
public
render(string $val, string $attr_name) : mixed
Your attribute needs to return HTML for a single input element. The field name for the element needs to be 'value'.
Parameters
- $val : string
-
The current value of the attribute
- $attr_name : string
-
The name of the attribute