classes/component/ComponentSubmitForm.php
protected function getModeProperty()
    {
        $arResult = [
            self::PROPERTY_MODE        => [
                'title'   => 'lovata.toolbox::lang.component.property_mode',
                'type'    => 'dropdown',
                'options' => [
                    self::MODE_SUBMIT => Lang::get('lovata.toolbox::lang.component.mode_'.self::MODE_SUBMIT),
                    self::MODE_AJAX   => Lang::get('lovata.toolbox::lang.component.mode_'.self::MODE_AJAX),
                ],
            ],
            self::PROPERTY_FLASH_ON    => [
                'title' => 'lovata.toolbox::lang.component.property_flash_on',
                'type'  => 'checkbox',
            ],
            self::PROPERTY_REDIRECT_ON => [
                'title' => 'lovata.toolbox::lang.component.property_redirect_on',
                'type'  => 'checkbox',
            ],
        ];

        try {
            $arPageList = Page::getNameList();
        } catch (\Exception $obException) {
            $arPageList = [];
        }

        if (!empty($arPageList)) {
            $arResult[self::PROPERTY_REDIRECT_PAGE] = [
                'title'             => 'lovata.toolbox::lang.component.property_redirect_page',
                'type'              => 'dropdown',
                'options'           => $arPageList,
            ];
        }

        return $arResult;
    }
protected function getModeProperty()
    {
        $arResult = [
            self::PROPERTY_MODE        => [
                'title'   => 'lovata.toolbox::lang.component.property_mode',
                'type'    => 'dropdown',
                'options' => [
                    self::MODE_SUBMIT => Lang::get('lovata.toolbox::lang.component.mode_'.self::MODE_SUBMIT),
                    self::MODE_AJAX   => Lang::get('lovata.toolbox::lang.component.mode_'.self::MODE_AJAX),
                ],
            ],
            self::PROPERTY_FLASH_ON    => [
                'title' => 'lovata.toolbox::lang.component.property_flash_on',
                'type'  => 'checkbox',
            ],
            self::PROPERTY_REDIRECT_ON => [
                'title' => 'lovata.toolbox::lang.component.property_redirect_on',
                'type'  => 'checkbox',
            ],
        ];

        try {
            $arPageList = Page::getNameList();
        } catch (\Exception $obException) {
            $arPageList = [];
        }

        if (!empty($arPageList)) {
            $arResult[self::PROPERTY_REDIRECT_PAGE] = [
                'title'             => 'lovata.toolbox::lang.component.property_redirect_page',
                'type'              => 'dropdown',
                'options'           => $arPageList,
            ];
        }

        return $arResult;
    }
protected function getModeProperty ( ) { $ arResult = [ self :: PROPERTY_MODE => [ 'title' => 'lovata.toolbox::lang.component.property_mode' , 'type' => 'dropdown' , 'options' => [ self :: MODE_SUBMIT => Lang :: get ( 'lovata.toolbox::lang.component.mode_' . self :: MODE_SUBMIT ) , self :: MODE_AJAX => Lang :: get ( 'lovata.toolbox::lang.component.mode_' . self :: MODE_AJAX ) , ] , ] , self :: PROPERTY_FLASH_ON => [ 'title' => 'lovata.toolbox::lang.component.property_flash_on' , 'type' => 'checkbox' , ] , self :: PROPERTY_REDIRECT_ON => [ 'title' => 'lovata.toolbox::lang.component.property_redirect_on' , 'type' => 'checkbox' , ] , ] ; try { $ arPageList = Page :: getNameList ( ) ; } catch ( \ Exception $ obException ) { $ arPageList = [ ] ; } if ( ! empty ( $ arPageList ) ) { $ arResult [ self :: PROPERTY_REDIRECT_PAGE ] = [ 'title' => 'lovata.toolbox::lang.component.property_redirect_page' , 'type' => 'dropdown' , 'options' => $ arPageList , ] ; } return $ arResult ; }
Get component property "mode"
@return array
Get component property mode