Interface.php
71 lines
| 1 | <?php |
| 2 | |
| 3 | interface Tribe__Editor__Blocks__Interface { |
| 4 | |
| 5 | /** |
| 6 | * Which is the name/slug of this block |
| 7 | * |
| 8 | * @since 4.8 |
| 9 | * |
| 10 | * @return string |
| 11 | */ |
| 12 | public function slug(); |
| 13 | |
| 14 | /** |
| 15 | * Which is the name/slug of this block |
| 16 | * |
| 17 | * @since 4.8 |
| 18 | * |
| 19 | * @return string |
| 20 | */ |
| 21 | public function name(); |
| 22 | |
| 23 | /** |
| 24 | * What are the default attributes for this block |
| 25 | * |
| 26 | * @since 4.8 |
| 27 | * |
| 28 | * @return array |
| 29 | */ |
| 30 | public function default_attributes(); |
| 31 | |
| 32 | /** |
| 33 | * Since we are dealing with a Dynamic type of Block we need a PHP method to render it |
| 34 | * |
| 35 | * @since 4.8 |
| 36 | * |
| 37 | * @param array $attributes |
| 38 | * |
| 39 | * @return string |
| 40 | */ |
| 41 | public function render( $attributes = [] ); |
| 42 | |
| 43 | /** |
| 44 | * Does the registration for PHP rendering for the Block, important due to been |
| 45 | * an dynamic Block |
| 46 | * |
| 47 | * @since 4.8 |
| 48 | * |
| 49 | * @return void |
| 50 | */ |
| 51 | public function register(); |
| 52 | |
| 53 | /** |
| 54 | * Used to include any Assets for the Block we are registering |
| 55 | * |
| 56 | * @since 4.8 |
| 57 | * |
| 58 | * @return void |
| 59 | */ |
| 60 | public function assets(); |
| 61 | |
| 62 | /** |
| 63 | * Attach any specific hook to the current block. |
| 64 | * |
| 65 | * @since 4.8 |
| 66 | * |
| 67 | * @return mixed |
| 68 | */ |
| 69 | public function hook(); |
| 70 | } |
| 71 |