| @@ -24,12 +24,12 @@ | ||
| 24 | 24 | } |
| 25 | 25 | } |
| 26 | 26 | } |
| 27 | 27 | |
| 28 | - public function get_image_url_for_side_panel(): string { | |
| 28 | + public function get_image_url_for_side_panel() : string { | |
| 29 | 29 | if ( $this->is_using_custom_image_for_side_panel() ) { |
| 30 | 30 | return \OsImageHelper::get_image_url_by_id( $this->side_panel_custom_image_id, 'thumbnail', '' ); |
| 31 | - } else { | |
| 31 | + }else{ | |
| 32 | 32 | return ''; |
| 33 | 33 | } |
| 34 | 34 | } |
| 35 | 35 | |
| @@ -42,20 +42,18 @@ | ||
| 42 | 42 | return ! empty( $this->side_panel_custom_image_id ); |
| 43 | 43 | } |
| 44 | 44 | |
| 45 | 45 | public static function create_from_settings( string $step_code, array $step_settings ): Step { |
| 46 | - return new Step( | |
| 47 | - [ | |
| 48 | - 'code' => $step_code, | |
| 49 | - 'label' => \OsStepsHelper::get_step_label_by_code( $step_code ), | |
| 50 | - 'side_panel_heading' => $step_settings['side_panel_heading'] ?? '', | |
| 51 | - 'side_panel_description' => $step_settings['side_panel_description'] ?? '', | |
| 52 | - 'main_panel_heading' => $step_settings['main_panel_heading'] ?? '', | |
| 53 | - 'main_panel_content_before' => $step_settings['main_panel_content_before'] ?? '', | |
| 54 | - 'main_panel_content_after' => $step_settings['main_panel_content_after'] ?? '', | |
| 55 | - 'side_panel_custom_image_id' => $step_settings['side_panel_custom_image_id'] ?? '', | |
| 56 | - ] | |
| 57 | - ); | |
| 46 | + return new Step( [ | |
| 47 | + 'code' => $step_code, | |
| 48 | + 'label' => \OsStepsHelper::get_step_label_by_code( $step_code ), | |
| 49 | + 'side_panel_heading' => $step_settings['side_panel_heading'] ?? '', | |
| 50 | + 'side_panel_description' => $step_settings['side_panel_description'] ?? '', | |
| 51 | + 'main_panel_heading' => $step_settings['main_panel_heading'] ?? '', | |
| 52 | + 'main_panel_content_before' => $step_settings['main_panel_content_before'] ?? '', | |
| 53 | + 'main_panel_content_after' => $step_settings['main_panel_content_after'] ?? '', | |
| 54 | + 'side_panel_custom_image_id' => $step_settings['side_panel_custom_image_id'] ?? '', | |
| 55 | + ] ); | |
| 58 | 56 | } |
| 59 | 57 | |
| 60 | 58 | public static function allowed_props(): array { |
| 61 | 59 | return [ |
| @@ -68,5 +66,5 @@ | ||
| 68 | 66 | 'main_panel_content_after', |
| 69 | 67 | 'side_panel_custom_image_id', |
| 70 | 68 | ]; |
| 71 | 69 | } |
| 72 | -} | |
| 70 | +} | |