| @@ -5,39 +5,24 @@ | ||
| 5 | 5 | |
| 6 | 6 | if ( class_exists( '\Elementor\Widget_Base' ) ) { |
| 7 | 7 | class FrmElementorWidget extends \Elementor\Widget_Base { |
| 8 | 8 | |
| 9 | - /** | |
| 10 | - * @return string | |
| 11 | - */ | |
| 12 | 9 | public function get_name() { |
| 13 | 10 | return 'formidable'; |
| 14 | 11 | } |
| 15 | 12 | |
| 16 | - /** | |
| 17 | - * @return string | |
| 18 | - */ | |
| 19 | 13 | public function get_title() { |
| 20 | 14 | return FrmAppHelper::get_menu_name() . ' ' . __( 'Forms', 'formidable' ); |
| 21 | 15 | } |
| 22 | 16 | |
| 23 | - /** | |
| 24 | - * @return string | |
| 25 | - */ | |
| 26 | 17 | public function get_icon() { |
| 27 | 18 | return FrmAppHelper::get_menu_icon_class(); |
| 28 | 19 | } |
| 29 | 20 | |
| 30 | - /** | |
| 31 | - * @return array | |
| 32 | - */ | |
| 33 | 21 | public function get_categories() { |
| 34 | 22 | return array( 'general' ); |
| 35 | 23 | } |
| 36 | 24 | |
| 37 | - /** | |
| 38 | - * @return void | |
| 39 | - */ | |
| 40 | 25 | protected function register_controls() { |
| 41 | 26 | $this->start_controls_section( |
| 42 | 27 | 'section_form_dropdown', |
| 43 | 28 | array( |
| @@ -71,14 +56,8 @@ | ||
| 71 | 56 | |
| 72 | 57 | $this->end_controls_section(); |
| 73 | 58 | } |
| 74 | 59 | |
| 75 | - /** | |
| 76 | - * @param string $key | |
| 77 | - * @param string $title | |
| 78 | - * | |
| 79 | - * @return void | |
| 80 | - */ | |
| 81 | 60 | private function add_basic_switcher_control( $key, $title ) { |
| 82 | 61 | $this->add_control( |
| 83 | 62 | $key, |
| 84 | 63 | array( |
| @@ -87,11 +66,8 @@ | ||
| 87 | 66 | ) |
| 88 | 67 | ); |
| 89 | 68 | } |
| 90 | 69 | |
| 91 | - /** | |
| 92 | - * @return array | |
| 93 | - */ | |
| 94 | 70 | private function get_form_options() { |
| 95 | 71 | $query = array(); |
| 96 | 72 | $where = apply_filters( 'frm_forms_dropdown', $query, 'form' ); |
| 97 | 73 | $forms = FrmForm::get_published_forms( $where, 999, 'exclude' ); |
| @@ -104,11 +80,8 @@ | ||
| 104 | 80 | |
| 105 | 81 | return $options; |
| 106 | 82 | } |
| 107 | 83 | |
| 108 | - /** | |
| 109 | - * @return void | |
| 110 | - */ | |
| 111 | 84 | protected function render() { |
| 112 | 85 | $settings = $this->get_settings_for_display(); |
| 113 | 86 | $form_id = isset( $settings['form_id'] ) ? absint( $settings['form_id'] ) : 0; |
| 114 | 87 | $title = isset( $settings['title'] ) && 'yes' === $settings['title']; |