Webylon 3.1 API Docs
  • Package
  • Class
  • Tree
  • Deprecated
  • Download
Version: current
  • 3.2
  • 3.1

Packages

  • auth
  • Booking
  • cart
    • shipping
    • steppedcheckout
  • Catalog
  • cms
    • assets
    • batchaction
    • batchactions
    • bulkloading
    • comments
    • content
    • core
    • export
    • newsletter
    • publishers
    • reports
    • security
    • tasks
  • Dashboard
  • DataObjectManager
  • event
  • faq
  • forms
    • actions
    • core
    • fields-basic
    • fields-dataless
    • fields-datetime
    • fields-files
    • fields-formatted
    • fields-formattedinput
    • fields-relational
    • fields-structural
    • transformations
    • validators
  • googlesitemaps
  • guestbook
  • installer
  • newsletter
  • None
  • photo
    • gallery
  • PHP
  • polls
  • recaptcha
  • sapphire
    • api
    • bulkloading
    • control
    • core
    • cron
    • dev
    • email
    • fields-formattedinput
    • filesystem
    • formatters
    • forms
    • i18n
    • integration
    • misc
    • model
    • parsers
    • search
    • security
    • tasks
    • testing
    • tools
    • validation
    • view
    • widgets
  • seo
    • open
      • graph
  • sfDateTimePlugin
  • spamprotection
  • stealth
    • captha
  • subsites
  • userform
    • pagetypes
  • userforms
  • webylon
  • widgets

Classes

  • Aggregate
  • Aggregate_Relationship
  • AssetAdminQuotaExtension
  • AttachedFilesExtension
  • BookingWidget
  • CheckoutPageExchangeExtension
  • ClassInfo
  • ControllerRedirectExtension
  • CSSContentParser
  • DisableJSValidation
  • Extension
  • HtmlEditorQuotaExtension
  • ManifestBuilder
  • MobileExtension
  • Object
  • PaymentMethodAutoHide
  • ProductSearchFormExtension
  • SS_Cache
  • TokenisedRegularExpression
  • ValidationResult
  • YamlFixture

Functions

  • __autoload
  • _t
  • array_fill_keys
  • getClassFile
  • getSysTempDir
  • getTempFolder
  • increase_memory_limit_to
  • increase_time_limit_to
  • project
  • singleton
  • stripslashes_recursively
  • translate_memstring
 1 <?php
 2 
 3 class ProductSearchFormExtension extends Extension {
 4     function extraStatics() {}
 5 
 6     function ProductSearchForm() {
 7         return $this->owner->SiteSearchForm();
 8     }
 9     
10     function SiteSearchForm($extra=null) {
11         if ($searchPage = DataObject::get_one('ProductSearchPage')) {
12             $controller = ModelAsController::controller_for($searchPage);
13             // берем сокращенную форму для отображения на всех страницах сайта
14             $current = ProductSearchPage::get_show_full_search_form();
15             ProductSearchPage::set_show_full_search_form(false);
16             $form = $controller->ProductSearchForm();
17             ProductSearchPage::set_show_full_search_form($current);
18             
19             $form->setTemplate('SiteProductSearch');
20             $form->getValidator()->setJavascriptValidationHandler('none');
21             $htmlID = 'SiteSearch';
22             if ($extra) {
23                 $form->addExtraClass($extra);
24                 $htmlID .= "_{$extra}"; 
25             }
26             $form->setHTMLID($htmlID);
27             if ($this->owner->getRequest()) {
28                 $form->loadDataFrom($this->owner->getRequest()->requestVars());
29             }
30             return $form;
31         } else {
32             user_error('Create ProductSearchPage first');
33         }
34     }
35 }
[Raise a SilverStripe Framework issue/bug](https://github.com/silverstripe/silverstripe-framework/issues/new)
- [Raise a SilverStripe CMS issue/bug](https://github.com/silverstripe/silverstripe-cms/issues/new)
- Please use the Silverstripe Forums to ask development related questions. -
Webylon 3.1 API Docs API documentation generated by ApiGen 2.8.0