public function configure() { $this->setWidgets(array('sf_plop_use_statistics' => new sfWidgetFormInputCheckbox(array('label' => 'Use statistics ?'), array('checked' => sfPlop::get('sf_plop_use_statistics') == true ? 'checked' : null)), 'sf_plop_statistics_code' => new sfWidgetFormTextarea(array('default' => sfPlop::get('sf_plop_statistics_code'), 'label' => 'Statistics code')), 'sf_plop_statistics_reports_url' => new sfWidgetFormInputText(array('label' => 'Statistics reports url'), array('value' => sfPlop::get('sf_plop_statistics_reports_url'))))); $this->setDefault('sf_plop_statistics_code', sfPlop::get('sf_plop_statistics_code')); $this->setValidators(array('sf_plop_use_statistics' => new sfValidatorBoolean(), 'sf_plop_statistics_code' => new sfValidatorString(array('required' => false)), 'sf_plop_statistics_reports_url' => new sfValidatorUrl(array('required' => false)))); parent::configure(); }
public function configure() { $this->setWidgets(array('sf_plop_theme' => new sfWidgetFormPlopChoiceTheme(array('label' => 'Theme', 'add_empty' => true)), 'sf_plop_theme_preview' => new sfWidgetFormInputCheckbox(array('label' => 'Preview')))); $this->setValidators(array('sf_plop_theme' => new sfValidatorPlopChoiceTheme(array('required' => false)), 'sf_plop_theme_preview' => new sfValidatorBoolean())); $this->widgetSchema->setHelps(array('sf_plop_theme_preview' => 'Check this option if you only want to preview the selected theme.')); parent::configure(); }
public function configure() { $this->setWidgets(array('sf_plop_allow_registration' => new sfWidgetFormInputCheckbox(array('label' => 'Allow registration ?'), array('checked' => sfPlop::get('sf_plop_allow_registration') == true ? 'checked' : null)), 'sf_plop_private_access' => new sfWidgetFormInputCheckbox(array('label' => 'Restrict public access ?'), array('checked' => sfPlop::get('sf_plop_private_access') == true ? 'checked' : null)), 'sf_plop_cache_lifetime' => new sfWidgetFormChoice(array('label' => 'Cache lifetime', 'choices' => $this->getCacheLifetimeValues())))); $this->setValidators(array('sf_plop_allow_registration' => new sfValidatorBoolean(), 'sf_plop_private_access' => new sfValidatorBoolean(), 'sf_plop_cache_lifetime' => new sfValidatorChoice(array('choices' => array_keys($this->getCacheLifetimeValues()))))); $this->setDefault('sf_plop_cache_lifetime', sfPlop::get('sf_plop_cache_lifetime')); parent::configure(); }
public function configure() { $this->setWidgets(array('sf_plop_website_description' => new sfWidgetFormTextarea(array('default' => sfPlop::get('sf_plop_website_description'), 'label' => 'SEO description')), 'sf_plop_website_keywords' => new sfWidgetFormInputText(array('label' => 'SEO keywords'), array('value' => sfPlop::get('sf_plop_website_keywords'))), 'sf_plop_use_custom_page_title' => new sfWidgetFormInputCheckbox(array('label' => 'Use the website title in the page title ?'), array('checked' => sfPlop::get('sf_plop_use_custom_page_title') == true ? 'checked' : null)), 'sf_plop_website_title_position' => new sfWidgetFormSelect(array('choices' => array('before' => 'before', 'after' => 'after'), 'label' => 'Website title position'), array()), 'sf_plop_website_title' => new sfWidgetFormInputText(array('label' => 'Website title'), array('value' => sfPlop::get('sf_plop_website_title'))), 'sf_plop_website_title_prefix' => new sfWidgetFormInputText(array('label' => 'Website title prefix'), array('value' => sfPlop::get('sf_plop_website_title_prefix'))), 'sf_plop_website_title_suffix' => new sfWidgetFormInputText(array('label' => 'Website title suffix'), array('value' => sfPlop::get('sf_plop_website_title_suffix'))), 'sf_plop_use_title_in_seo_description' => new sfWidgetFormInputCheckbox(array('label' => 'Use the page title in the description ?'), array('checked' => sfPlop::get('sf_plop_use_title_in_seo_description') == true ? 'checked' : null)))); $this->setDefault('sf_plop_website_title_position', sfPlop::get('sf_plop_website_title_position')); $this->setValidators(array('sf_plop_website_description' => new sfValidatorString(array('required' => false)), 'sf_plop_website_keywords' => new sfValidatorString(array('required' => false)), 'sf_plop_use_custom_page_title' => new sfValidatorBoolean(array('required' => false)), 'sf_plop_website_title_position' => new sfValidatorPass(), 'sf_plop_website_title' => new sfValidatorString(array('required' => false)), 'sf_plop_website_title_prefix' => new sfValidatorString(array('required' => false)), 'sf_plop_website_title_suffix' => new sfValidatorString(array('required' => false)), 'sf_plop_use_title_in_seo_description' => new sfValidatorBoolean(array('required' => false)))); parent::configure(); }
public function configure() { parent::configure(); $selector = 'body'; $this->setWidgets(array('sf_plop_background_image' => new sfWidgetFormAssetExtraChoice(array('label' => 'Background image'), array('value' => sfPlop::get('sf_plop_background_image'), 'data-property' => 'background-image', 'data-target' => $selector)), 'sf_plop_background_color' => new sfWidgetFormInputColor(array('label' => 'Background color'), array('value' => sfPlop::get('sf_plop_background_color'), 'data-property' => 'background-color', 'data-target' => $selector)), 'sf_plop_background_repeat' => new sfWidgetFormCssProperty(array('property' => 'background-repeat', 'label' => 'Background repetition'), array('value' => sfPlop::get('sf_plop_background_repeat'), 'data-property' => 'background-repeat', 'data-target' => $selector)), 'sf_plop_background_position_horizontal' => new sfWidgetFormCssProperty(array('property' => 'background-position-x', 'label' => 'Horizontal background position'), array('value' => sfPlop::get('sf_plop_background_position_horizontal'), 'data-property' => 'background-position-x', 'data-target' => $selector)), 'sf_plop_background_position_vertical' => new sfWidgetFormCssProperty(array('property' => 'background-position-y', 'label' => 'Vertical background position'), array('value' => sfPlop::get('sf_plop_background_position_vertical'), 'data-property' => 'background-position-y', 'data-target' => $selector)))); $this->setValidators(array('sf_plop_background_image' => new sfValidatorString(array('required' => false)), 'sf_plop_background_color' => new sfValidatorString(array('required' => false)), 'sf_plop_background_repeat' => new sfValidatorString(array('required' => false)), 'sf_plop_background_position_horizontal' => new sfValidatorString(array('required' => false)), 'sf_plop_background_position_vertical' => new sfValidatorString(array('required' => false)))); $this->widgetSchema->getFormFormatter()->setTranslationCatalogue('plopAdmin'); }
public function configure() { $this->setWidgets(array('sf_plop_custom_favicon' => new sfWidgetFormAssetExtraChoice(array('label' => 'Favicon'), array('value' => sfPlop::get('sf_plop_custom_favicon'))), 'sf_plop_custom_webapp_favicon' => new sfWidgetFormAssetExtraChoice(array('label' => 'Webapp icon'), array('value' => sfPlop::get('sf_plop_custom_webapp_favicon'))), 'sf_plop_use_image_zoom' => new sfWidgetFormInputCheckbox(array('label' => 'Use image zoom ?'), array('checked' => sfPlop::get('sf_plop_use_image_zoom') === true ? 'checked' : null)), 'sf_plop_use_html5' => new sfWidgetFormInputCheckbox(array('label' => 'Use HTML5 ?'), array('checked' => sfPlop::get('sf_plop_use_html5') === true ? 'checked' : null)), 'sf_plop_use_ajax' => new sfWidgetFormInputCheckbox(array('label' => 'Use Ajax in navigation menus ?'), array('checked' => sfPlop::get('sf_plop_use_ajax') === true ? 'checked' : null)), 'sf_plop_css' => new sfWidgetFormAssetExtraChoice(array('label' => 'Stylesheet'), array('value' => sfPlop::get('sf_plop_css'))), 'sf_plop_js' => new sfWidgetFormAssetExtraChoice(array('label' => 'Javascript'), array('value' => sfPlop::get('sf_plop_js'))), 'sf_plop_admin_theme' => new sfWidgetFormPlopChoiceAdminTheme(array('label' => 'Admin theme', 'add_empty' => true)))); $this->setDefault('sf_plop_admin_theme', sfPlop::get('sf_plop_admin_theme')); $this->setValidators(array('sf_plop_custom_favicon' => new sfValidatorString(array('required' => false)), 'sf_plop_custom_webapp_favicon' => new sfValidatorString(array('required' => false)), 'sf_plop_use_image_zoom' => new sfValidatorBoolean(), 'sf_plop_use_html5' => new sfValidatorBoolean(), 'sf_plop_use_ajax' => new sfValidatorBoolean(), 'sf_plop_admin_theme' => new sfValidatorPlopChoiceAdminTheme(array('required' => false)), 'sf_plop_css' => new sfValidatorString(array('required' => false)), 'sf_plop_js' => new sfValidatorString(array('required' => false)))); $this->widgetSchema->setHelps(array('sf_plop_custom_webapp_favicon' => 'This is used on smartphones when you create a shorcut on the desktop.')); parent::configure(); }
public function configure() { parent::configure(); $selector = '#container .w-block'; $this->setWidgets(array('sf_plop_block_text_font' => new sfWidgetFormCssProperty(array('property' => 'font-family', 'label' => 'Font family'), array('value' => sfPlop::get('sf_plop_block_text_font'), 'title' => 'font-family', 'data-target' => $selector)), 'sf_plop_block_text_size' => new sfWidgetFormCssProperty(array('property' => 'font-size', 'label' => 'Font size'), array('value' => sfPlop::get('sf_plop_block_text_size'), 'title' => 'font-size', 'data-target' => $selector)), 'sf_plop_block_text_color' => new sfWidgetFormInputColor(array('label' => 'Text color'), array('value' => sfPlop::get('sf_plop_block_text_color'), 'title' => 'color', 'data-target' => $selector)), 'sf_plop_block_link_color' => new sfWidgetFormInputColor(array('label' => 'Link color'), array('value' => sfPlop::get('sf_plop_block_link_color'), 'title' => 'color', 'data-target' => $selector . ' a')), 'sf_plop_block_bold_color' => new sfWidgetFormInputColor(array('label' => 'Bold text color'), array('value' => sfPlop::get('sf_plop_block_bold_color'), 'title' => 'color', 'data-target' => $selector . ' b,' . $selector . ' strong')), 'sf_plop_block_italic_color' => new sfWidgetFormInputColor(array('label' => 'Italic text color'), array('value' => sfPlop::get('sf_plop_block_italic_color'), 'title' => 'color', 'data-target' => $selector . ' i,' . $selector . ' em')))); $this->setValidators(array('sf_plop_block_text_font' => new sfValidatorString(array('required' => false)), 'sf_plop_block_text_size' => new sfValidatorString(array('required' => false)), 'sf_plop_block_text_color' => new sfValidatorString(array('required' => false)), 'sf_plop_block_link_color' => new sfValidatorString(array('required' => false)), 'sf_plop_block_bold_color' => new sfValidatorString(array('required' => false)), 'sf_plop_block_italic_color' => new sfValidatorString(array('required' => false)))); $this->widgetSchema->getFormFormatter()->setTranslationCatalogue('plopAdmin'); }
public function configure() { parent::configure(); $selector = '#container'; $this->setWidgets(array('sf_plop_icon' => new sfWidgetFormAssetExtraChoice(array('label' => 'Favicon'), array('value' => sfPlop::get('sf_plop_icon'))), 'sf_plop_css' => new sfWidgetFormAssetExtraChoice(array('label' => 'Stylesheet'), array('value' => sfPlop::get('sf_plop_css'))), 'sf_plop_js' => new sfWidgetFormAssetExtraChoice(array('label' => 'Javascript'), array('value' => sfPlop::get('sf_plop_js'))), 'sf_plop_website_width' => new sfWidgetFormCssProperty(array('property' => 'website-width', 'label' => 'Website width'), array('value' => sfPlop::get('sf_plop_website_width'), 'data-property' => 'width', 'data-target' => $selector)))); $this->setValidators(array('sf_plop_icon' => new sfValidatorString(array('required' => false)), 'sf_plop_css' => new sfValidatorString(array('required' => false)), 'sf_plop_js' => new sfValidatorString(array('required' => false)), 'sf_plop_website_width' => new sfValidatorString(array('required' => false)))); $this->widgetSchema->getFormFormatter()->setTranslationCatalogue('plopAdmin'); }
public function configure() { $this->setWidgets(array('sf_plop_default_culture' => new sfWidgetFormI18nChoiceLanguage(array('culture' => sfPlop::get('sf_plop_default_culture'), 'languages' => sfPlop::get('sf_plop_cultures'))), 'sf_plop_cultures' => new sfWidgetFormPlopI18nChoiceLanguage(array('expanded' => true, 'culture' => sfPlop::get('sf_plop_default_culture'), 'multiple' => true)))); $this->setDefault('sf_plop_default_culture', sfPlop::get('sf_plop_default_culture')); $this->setDefault('sf_plop_cultures', sfPlop::get('sf_plop_cultures')); $this->widgetSchema->setLabels(array('sf_plop_default_culture' => 'Default language', 'sf_plop_cultures' => 'Languages')); $this->setValidators(array('sf_plop_default_culture' => new sfValidatorI18nChoiceLanguage(array('languages' => sfPlop::get('sf_plop_cultures'))), 'sf_plop_cultures' => new sfValidatorI18nChoiceLanguage(array('multiple' => true)))); parent::configure(); }
public function configure() { parent::configure(); $this->embedForm('common', new sfPlopThemeCommonForm()); $this->embedForm('bg', new sfPlopThemeBackgroundForm()); $this->embedForm('wrapper', new sfPlopThemeWrapperForm()); $this->embedForm('block', new sfPlopThemeBlockForm()); $this->embedForm('text', new sfPlopThemeTextForm()); $this->widgetSchema->setNameFormat('sfPlopThemeEdition[%s]'); }
public function configure() { $this->setWidgets(array('sf_plop_cms_enabled_slot_templates' => new sfWidgetFormChoice(array('multiple' => true, 'expanded' => true, 'choices' => self::getSlots(), 'default' => sfPlop::getEnabledSlots(), 'label' => 'Enabled slot templates')))); $this->setValidators(array('sf_plop_cms_enabled_slot_templates' => new sfValidatorChoice(array('multiple' => true, 'choices' => array_keys(self::getSlots()))))); parent::configure(); }
public function configure() { $this->setWidgets(array('sf_plop_messaging_from_name' => new sfWidgetFormInputText(array('label' => 'Sender name'), array('value' => sfPlop::get('sf_plop_messaging_from_name'))), 'sf_plop_messaging_from_email' => new sfWidgetFormInputText(array('label' => 'Sender email'), array('value' => sfPlop::get('sf_plop_messaging_from_email'))), 'sf_plop_messaging_to_name' => new sfWidgetFormInputText(array('label' => 'Receiver name'), array('value' => sfPlop::get('sf_plop_messaging_to_name'))), 'sf_plop_messaging_to_email' => new sfWidgetFormInputText(array('label' => 'Receiver email'), array('value' => sfPlop::get('sf_plop_messaging_to_email'))), 'sf_plop_messaging_subject' => new sfWidgetFormInputText(array('label' => 'Message subject'), array('value' => sfPlop::get('sf_plop_messaging_subject'))), 'sf_plop_messaging_message' => new sfWidgetFormTextarea(array('default' => sfPlop::get('sf_plop_messaging_message'), 'label' => 'Message text')))); $this->setValidators(array('sf_plop_messaging_from_name' => new sfValidatorString(array('required' => false)), 'sf_plop_messaging_from_email' => new sfValidatorEmail(array('required' => false)), 'sf_plop_messaging_to_name' => new sfValidatorString(array('required' => false)), 'sf_plop_messaging_to_email' => new sfValidatorEmail(array('required' => false)), 'sf_plop_messaging_subject' => new sfValidatorString(array('required' => false)), 'sf_plop_messaging_message' => new sfValidatorString(array('required' => false)))); parent::configure(); }
public function configure() { $this->setWidgets(array('sf_plop_enabled_modules' => new sfWidgetFormChoice(array('multiple' => true, 'expanded' => true, 'choices' => $this->getPluginModules(), 'default' => sfPlop::get('sf_plop_enabled_modules'), 'label' => 'Enabled modules')), 'sf_plop_enabled_links' => new sfWidgetFormChoice(array('multiple' => true, 'expanded' => true, 'choices' => $this->getPluginLinks(), 'default' => sfPlop::get('sf_plop_enabled_links'), 'label' => 'Enabled links')))); $this->setValidators(array('sf_plop_enabled_modules' => new sfValidatorChoice(array('required' => false, 'multiple' => true, 'choices' => array_keys($this->getPluginModules()))), 'sf_plop_enabled_links' => new sfValidatorChoice(array('required' => false, 'multiple' => true, 'choices' => array_keys($this->getPluginLinks()))))); parent::configure(); }
public function configure() { $this->setWidgets(array('sf_plop_enabled_slots' => new sfWidgetFormChoice(array('multiple' => true, 'expanded' => true, 'choices' => sfPlop::getSafePluginSlots(true), 'default' => sfPlop::get('sf_plop_enabled_slots'), 'label' => 'Enabled slots')))); $this->setValidators(array('sf_plop_enabled_slots' => new sfValidatorChoice(array('required' => false, 'multiple' => true, 'choices' => array_keys(sfPlop::getSafePluginSlots(true)))))); parent::configure(); }
public function configure() { $this->setWidgets(array('sfPlopCMS_use_feed' => new sfWidgetFormInputCheckbox(array('label' => 'Use feed ?'), array('checked' => sfPlop::get('sfPlopCMS_use_feed') == true ? 'checked' : null)))); $this->setValidators(array('sfPlopCMS_use_feed' => new sfValidatorBoolean())); parent::configure(); }