@@ -17,58 +17,58 @@ |
||
17 | 17 | class EventAttendees extends Block |
18 | 18 | { |
19 | 19 | |
20 | - const BLOCK_TYPE = 'widgets-event-attendees'; |
|
20 | + const BLOCK_TYPE = 'widgets-event-attendees'; |
|
21 | 21 | |
22 | - /** |
|
23 | - * @var EspressoEventAttendees $shortcode |
|
24 | - */ |
|
25 | - protected $shortcode; |
|
22 | + /** |
|
23 | + * @var EspressoEventAttendees $shortcode |
|
24 | + */ |
|
25 | + protected $shortcode; |
|
26 | 26 | |
27 | 27 | |
28 | - /** |
|
29 | - * EventAttendees constructor. |
|
30 | - * |
|
31 | - * @param CoreBlocksAssetManager $block_asset_manager |
|
32 | - * @param EspressoEventAttendees $shortcode |
|
33 | - */ |
|
34 | - public function __construct(CoreBlocksAssetManager $block_asset_manager, EspressoEventAttendees $shortcode) |
|
35 | - { |
|
36 | - parent::__construct($block_asset_manager); |
|
37 | - $this->shortcode = $shortcode; |
|
38 | - } |
|
28 | + /** |
|
29 | + * EventAttendees constructor. |
|
30 | + * |
|
31 | + * @param CoreBlocksAssetManager $block_asset_manager |
|
32 | + * @param EspressoEventAttendees $shortcode |
|
33 | + */ |
|
34 | + public function __construct(CoreBlocksAssetManager $block_asset_manager, EspressoEventAttendees $shortcode) |
|
35 | + { |
|
36 | + parent::__construct($block_asset_manager); |
|
37 | + $this->shortcode = $shortcode; |
|
38 | + } |
|
39 | 39 | |
40 | 40 | |
41 | - /** |
|
42 | - * Perform any early setup required by the block |
|
43 | - * including setting the block type and supported post types |
|
44 | - * |
|
45 | - * @return void |
|
46 | - */ |
|
47 | - public function initialize() |
|
48 | - { |
|
49 | - $this->setBlockType(self::BLOCK_TYPE); |
|
50 | - $this->setSupportedPostTypes(array('espresso_events', 'post', 'page')); |
|
51 | - $this->setAttributes(array()); |
|
52 | - $this->setDynamic(); |
|
53 | - } |
|
41 | + /** |
|
42 | + * Perform any early setup required by the block |
|
43 | + * including setting the block type and supported post types |
|
44 | + * |
|
45 | + * @return void |
|
46 | + */ |
|
47 | + public function initialize() |
|
48 | + { |
|
49 | + $this->setBlockType(self::BLOCK_TYPE); |
|
50 | + $this->setSupportedPostTypes(array('espresso_events', 'post', 'page')); |
|
51 | + $this->setAttributes(array()); |
|
52 | + $this->setDynamic(); |
|
53 | + } |
|
54 | 54 | |
55 | 55 | |
56 | - /** |
|
57 | - * returns the rendered HTML for the block |
|
58 | - * |
|
59 | - * @param array $attributes |
|
60 | - * @return string |
|
61 | - * @throws \EE_Error |
|
62 | - * @throws \EventEspresso\core\exceptions\InvalidDataTypeException |
|
63 | - * @throws \EventEspresso\core\exceptions\InvalidInterfaceException |
|
64 | - * @throws \InvalidArgumentException |
|
65 | - */ |
|
66 | - public function renderBlock(array $attributes = array()) |
|
67 | - { |
|
68 | - if (! isset($attributes['selectedEventId'])) { |
|
69 | - return '<h2>' . __METHOD__ . '()</h2>' . var_export($attributes, true); |
|
70 | - } |
|
71 | - $attributes['event_id'] = absint($attributes['selectedEventId']); |
|
72 | - return $this->shortcode->processShortcode($attributes); |
|
73 | - } |
|
56 | + /** |
|
57 | + * returns the rendered HTML for the block |
|
58 | + * |
|
59 | + * @param array $attributes |
|
60 | + * @return string |
|
61 | + * @throws \EE_Error |
|
62 | + * @throws \EventEspresso\core\exceptions\InvalidDataTypeException |
|
63 | + * @throws \EventEspresso\core\exceptions\InvalidInterfaceException |
|
64 | + * @throws \InvalidArgumentException |
|
65 | + */ |
|
66 | + public function renderBlock(array $attributes = array()) |
|
67 | + { |
|
68 | + if (! isset($attributes['selectedEventId'])) { |
|
69 | + return '<h2>' . __METHOD__ . '()</h2>' . var_export($attributes, true); |
|
70 | + } |
|
71 | + $attributes['event_id'] = absint($attributes['selectedEventId']); |
|
72 | + return $this->shortcode->processShortcode($attributes); |
|
73 | + } |
|
74 | 74 | } |
@@ -65,8 +65,8 @@ |
||
65 | 65 | */ |
66 | 66 | public function renderBlock(array $attributes = array()) |
67 | 67 | { |
68 | - if (! isset($attributes['selectedEventId'])) { |
|
69 | - return '<h2>' . __METHOD__ . '()</h2>' . var_export($attributes, true); |
|
68 | + if ( ! isset($attributes['selectedEventId'])) { |
|
69 | + return '<h2>'.__METHOD__.'()</h2>'.var_export($attributes, true); |
|
70 | 70 | } |
71 | 71 | $attributes['event_id'] = absint($attributes['selectedEventId']); |
72 | 72 | return $this->shortcode->processShortcode($attributes); |