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

Packages

  • 1c
    • exchange
      • catalog
  • auth
  • Booking
  • building
    • company
  • cart
    • shipping
    • steppedcheckout
  • Catalog
    • monument
  • 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

  • ExactMatchFilterWithEmpty
  • LeftAndMainQuota
  • TextFieldWithEmptyFlag
  • WebylonSiteConfig
 1 <?php
 2 /**
 3  * Поле для поиска по текстовому полю объекта с возможностью поиска пустого значения
 4  * 
 5  * @package webylon
 6  * @author menedem  
 7  */
 8 class TextFieldWithEmptyFlag extends TextField {
 9     
10     protected $emptyFlagField = null;
11         
12     function __construct($name, $title = null, $value = "", $className = 'NumericField'){
13         $this->emptyFlagField = new CheckboxField($name . '[IsEmpty]');
14         parent::__construct($name, $title, $value);
15     }
16     
17     function setForm($form) {
18         parent::setForm($form);     
19         $this->emptyFlagField->setForm($form);      
20     }
21     
22     function Field() {
23         Requirements::javascript('site/javascript/empty_field.js');
24         $field = parent::Field();
25         return $field . '<label class="label-empty">' . $this->emptyFlagField->Field() . _t('TextFieldWithEmptyFlag.empty', 'empty') . '</label>';
26     }
27 }
28 
29 
[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.2 API Docs API documentation generated by ApiGen 2.8.0