1 | <?php |
||
18 | class EventAttendees extends Block |
||
19 | { |
||
20 | |||
21 | const BLOCK_TYPE = 'widgets-event-attendees'; |
||
22 | |||
23 | /** |
||
24 | * @var EspressoEventAttendees $shortcode |
||
25 | */ |
||
26 | protected $shortcode; |
||
27 | |||
28 | |||
29 | /** |
||
30 | * EventAttendees constructor. |
||
31 | * |
||
32 | * @param CoreBlocksAssetManager $block_asset_manager |
||
33 | * @param EspressoEventAttendees $shortcode |
||
34 | */ |
||
35 | public function __construct(CoreBlocksAssetManager $block_asset_manager, EspressoEventAttendees $shortcode) |
||
40 | |||
41 | |||
42 | /** |
||
43 | * Perform any early setup required by the block |
||
44 | * including setting the block type and supported post types |
||
45 | * |
||
46 | * @return void |
||
47 | */ |
||
48 | public function initialize() |
||
82 | |||
83 | |||
84 | /** |
||
85 | * returns an array where the key corresponds to the incoming attribute name from the WP block |
||
86 | * and the value corresponds to the attribute name for the existing EspressoEventAttendees shortcode |
||
87 | * |
||
88 | * @since $VID:$ |
||
89 | * @return array |
||
90 | */ |
||
91 | private function getAttributesMap() |
||
102 | |||
103 | |||
104 | /** |
||
105 | * @param array $attributes |
||
106 | * @since $VID:$ |
||
107 | * @return array |
||
108 | */ |
||
109 | private function parseAttributes(array $attributes) |
||
128 | |||
129 | |||
130 | /** |
||
131 | * returns the rendered HTML for the block |
||
132 | * |
||
133 | * @param array $attributes |
||
134 | * @return string |
||
135 | * @throws \EE_Error |
||
136 | * @throws \EventEspresso\core\exceptions\InvalidDataTypeException |
||
137 | * @throws \EventEspresso\core\exceptions\InvalidInterfaceException |
||
138 | * @throws \InvalidArgumentException |
||
139 | */ |
||
140 | public function renderBlock(array $attributes = array()) |
||
144 | } |
||
145 |