BlueShoes Application Framework made with PHP http://www.blueshoes.org/


Packageindex Classtrees Modulegroups Elementlist Report XML Files

File: C:/usr/local/lib/php/blueshoes-4.2/core/html/form/Bs_FormFieldCheckbox.class.php
BlueShoes Application Framework - Form

Bs_FormFieldCheckbox

Bs_Object
   |
  +-- Bs_FormElement
     |
    +-- Bs_FormField
       |
      +-- Bs_FormFieldCheckbox

CHECKBOX Form Field Class

 

public class Bs_FormFieldCheckbox extends Bs_FormField

CHECKBOX Form Field Class
example tag:<input type="checkbox" name="fieldname" value="value" checked> do you want to click here?what's special about this tag?- checked => if we have a value = 1, this means checked. 0 means not checked.- text => usually there is some additional text, like "do you want to receive the freenewsletter?"no dependencies here.

Authorsandrej arn <andrej@arn.li>
Version4.0.$id$
Copyrightblueshoes.org

 

Methods inherited from Bs_FormField

bs_formfield, &getelement, getfield, addenforcecheckbox, isexplodable, getadvancedstyle, getadvancedstylehelper, setexplode, getlabel, inputmanipulate, validatemust, validateonlyoneof, validateonlyif, validateminlength, validatemaxlength, validatemuststartwith, validatenotstartwith, validatemustendwith, validatenotendwith, validatemustcontain, validatenotcontain, validateequalto, validatenotequalto, validatedatatype, validateregularexpression, validateadditionalcheck, validatemustbeunique, getvisibility, getonenterbehavior, getonentercode, applyonenterbehavior, shouldpersist, getdbdatatype, getdbfieldname, _getmaxlength, _gettagstringevents, getvalue, _gettagstringvalue, _gettagstringstyles, _gettagstringadditionaltags, getcaptionforformoutput, geterror, gethelp, _highlightaccesskey, _getaccesskey, getfieldashidden, _getfieldnameforhtml, hasjavascript, ismust, _anyifcase, _markasused, _getbsdatainfonumber, isfilledin, _evalwrap, unpersisttrigger, geterrormessage, &serialize, unserialize, &encrypt, &decrypt, initfrompost

Methods inherited from Bs_FormElement

bs_formelement, hasformobject, setformobject, getelement, getlevel, _doelementstringformat, _getparamvalue, getlanguagedependentvalue

Methods inherited from Bs_Object

isex, isexception, tostring, tohtml, persist, unpersist, bs_object, bbsetoutput, bbawake, bbisawake, bbxmsg, bbxfunctionstart, bbxfunctionend, bbxecho, bbxvar, bbxvardump, bbforcetrace, bbbufferstart, bbbufferget, bbbufferendflush, bbbufferendclean

Public Method Summary

string

&getField([ mixed $explodeKey, string $withText, string $addEnforceCheckbox ])

Return some html code to display the field on a website in a form.
string

getFieldText([ string $clickable ])

returns the description text for the checkbox.
string

getReadableValue([ string $value, string $lang ])

returns a human-readable representation of [a|the] value of this field
mixed

inputValidate([ mixed $paramValue ])

validate the user inputs according to the object vars.Warning: documentation is missing.
void

Bs_FormFieldCheckbox()

Warning: documentation is missing.

Private Method Summary

string

getCaption([ string $useAccessKey, string $lang, string $clickable ])

Return the caption string (for the current language).Warning: documentation is missing.

Fields inherited from Bs_FormField

$_bs_string, $_bs_array, $_bs_htmlutil, $_bs_date, $fieldtype, $caption, $defaulterrormessage, $errormessage, $errortype, $level, $editability, $accessrights, $visibility, $isused, $valuedefault, $valuedefaulttype, $valuereceived, $valuedisplay, $valueinternal, $savetodb, $dbfieldname, $dbdatatype, $dbnotnull, $dbprimarykey, $dbkey, $dbindexfulltext, $dbautoincrement, $dbunique, $dbforeignkey, $dbattributes, $explodeeval, $_explodearray, $direction, $styles, $advancedstyles, $events, $onenter, $additionaltags, $bsdatatype, $bsdatainfo, $bsdatamanipulation, $bsdatamanipvar, $enforce, $_must, $must, $mustif, $mustoneof, $mustoneofif, $onlyoneof, $onlyif, $onlyoneofif, $minlength, $maxlength, $muststartwith, $notstartwith, $mustendwith, $notendwith, $mustcontain, $notcontain, $equalto, $notequalto, $mustbeunique, $regularexpression, $additionalcheck, $trim, $remove, $removei, $replace, $replacei, $case, $codepostreceive, $codepostload, $charsrule

Fields inherited from Bs_FormElement

$persister, $persisterid, $_form, $name, $elementtype, $formid, $container, $orderid, $elementstringformat, $persistervarsettings

Private Field Summary

mixed

$text

additional text as in
unknown

$this

Private Constant Summary

BS_FORMFIELDCHECKBOX_VERSION >>4.0.$x$<< Warning: documentation is missing.

Public Method Details

&getField

public string &getField( [ mixed $explodeKey, string $withText, string $addEnforceCheckbox ] )

  Return some html code to display the field on a website in a form.
overwrites parent method.

Parameter
mixed $explodeKey = >>NULL,<<
(int or string)
string $withText = >>TRUE,<<
if the description should be returned also. default is TRUE.
string $addEnforceCheckbox = >>TRUE<<
default is TRUE. adds the enforce checkbox automatically, if needed. see (parent::)addEnforceCheckbox().
Returns string

some html code

See Also $this, $this

getFieldText

public string getFieldText( [ string $clickable ] )

  returns the description text for the checkbox.

Parameter
string $clickable = >>FALSE<<
if a click on this text should toggle the checkbox. default is FALSE.
Returns string

the text, maybe with html if $clickable.


getReadableValue

public string getReadableValue( [ string $value, string $lang ] )

  returns a human-readable representation of [a|the] value of this field
in the default or given language.

Parameter
string $value = >>null,<<
(not given = use the $valueDisplay of this field.)
string $lang = >>null<<
(not given = use the lang of this form.)
Returns string


inputValidate

public mixed inputValidate( [ mixed $paramValue ] )

  validate the user inputs according to the object vars.
overwrites parent method. read manual there. additional information:the order for data validation is: (-- means check omitted here)1) must 5) --mustStartWith 9) --mustContain 13) --bsDataType/bsDataInfo2) --onlyOneOf 6) --notStartWith 10) --notContain 14) --regularExpression3) --minLength 7) --mustEndWith 11) --equalTo 15) --mustBeUnique4) --maxLength 8) --notEndWith 12) --notEqualToso 'must' is the only thing we really use here. you may say it's not of any use also,but think of the checkbox "do you agree to the terms and conditions" which is just thereto be clicked.

Warning: documentation is missing.

Parameter
mixed $paramValue = >>NULL<<
(only used internally!!!)
Returns mixed


Bs_FormFieldCheckbox

public void Bs_FormFieldCheckbox( )

 

Warning: documentation is missing.

Returns void


Private Method Details

getCaption

private string getCaption( [ string $useAccessKey, string $lang, string $clickable ] )

  Return the caption string (for the current language).
overwrites/uses parent method.

Warning: documentation is missing.

Parameter
string $useAccessKey = >>TRUE,<<
if we should 'highlight' the access key in the returned caption. default = TRUE.
string $lang = >>null,<<
(default is null. if not given then the lang setting of the form is used.)
string $clickable = >>FALSE<<
if the caption should be clickable to toggle the checkbox value. default is FALSE.
Returns string

the caption for this field.

See Also $this, $this

Private Field Details

$text

private mixed $text

>><<

additional text as in
<input type="checkbox" name="fieldname" value="value" checked> do you want to click here?usually a string, can be a hash because it's language dependant.


$this

private unknown $this

>><<



Private Constant Details

BS_FORMFIELDCHECKBOX_VERSION

define( BS_FORMFIELDCHECKBOX_VERSION, >>4.0.$x$<< )
Case: default: case sensitive




Packageindex Classtrees Modulegroups Elementlist Report XML Files
PHPDoc 1.0beta