| 1 | <?php |
||
| 10 | class Field extends Block { |
||
| 11 | const BLOCK_NAME = 'field'; |
||
| 12 | |||
| 13 | /** |
||
| 14 | * Generate `[gvfield]` shortcode |
||
| 15 | * |
||
| 16 | * @param array $attributes |
||
| 17 | * array['view_id'] string The numeric View ID the entry should be displayed from |
||
| 18 | * array['entry_id'] string A numeric ID or slug referencing the entry. Or the last, first entry from the View. The View's sorting and filtering settings will be applied to the entries |
||
| 19 | * array['field_id'] string The field ID that should be ouput. Required. If this is a merge of several form feeds multiple fields can be provided separated by a comma |
||
| 20 | * array['custom_label'] string Custom label for the field |
||
| 21 | * |
||
| 22 | * @return string $output |
||
| 23 | */ |
||
| 24 | static function render( $attributes = array() ) { |
||
| 49 | } |
||
| 50 |
Adding explicit visibility (
private,protected, orpublic) is generally recommend to communicate to other developers how, and from where this method is intended to be used.