| 1 |
<?php defined('ABSPATH') or die; |
| 2 |
|
| 3 |
/** |
| 4 |
* @package pixcustomify |
| 5 |
* @category core |
| 6 |
* @author Pixelgrade Team |
| 7 |
* @copyright (c) 2013, Pixelgrade |
| 8 |
*/ |
| 9 |
interface PixCustomifyForm extends PixCustomifyHTMLElement { |
| 10 |
|
| 11 |
/** |
| 12 |
* @return static $this |
| 13 |
*/ |
| 14 |
function addtemplatepath($path); |
| 15 |
|
| 16 |
/** |
| 17 |
* @return PixCustomifyFormField |
| 18 |
*/ |
| 19 |
function field($fieldname); |
| 20 |
|
| 21 |
/** |
| 22 |
* @return static $this |
| 23 |
*/ |
| 24 |
function errors($errors); |
| 25 |
|
| 26 |
/** |
| 27 |
* @param string field name |
| 28 |
* @return array error keys with messages |
| 29 |
*/ |
| 30 |
function errors_for($fieldname); |
| 31 |
|
| 32 |
/** |
| 33 |
* Autocomplete meta object passed on by the processor. |
| 34 |
* |
| 35 |
* @param PixCustomifyMeta autocomplete values |
| 36 |
* @return static $this |
| 37 |
*/ |
| 38 |
function autocomplete(PixCustomifyMeta $autocomplete); |
| 39 |
|
| 40 |
/** |
| 41 |
* Retrieves the value registered for auto-complete. This will not fallback |
| 42 |
* to the default value set in the configuration since fields are |
| 43 |
* responsible for managing their internal complexity. |
| 44 |
* |
| 45 |
* Typically the autocomplete values are what the processor passes on to |
| 46 |
* the form. |
| 47 |
* |
| 48 |
* @return mixed |
| 49 |
*/ |
| 50 |
function autovalue($key, $default = null); |
| 51 |
|
| 52 |
/** |
| 53 |
* @return string |
| 54 |
*/ |
| 55 |
function startform(); |
| 56 |
|
| 57 |
/** |
| 58 |
* @return string |
| 59 |
*/ |
| 60 |
function endform(); |
| 61 |
|
| 62 |
/** |
| 63 |
* @param string template path |
| 64 |
* @param array configuration |
| 65 |
* @return string |
| 66 |
*/ |
| 67 |
function fieldtemplate($templatepath, $conf = array()); |
| 68 |
|
| 69 |
} # interface |
| 70 |
|