Methods |
public
|
setName(String $val)
Set Name of Object which is used for html tag id and name.
Set Name of Object which is used for html tag id and name.
|
#
|
public
|
getName(): String
Get Name of Object which is used for html tag id and name.
Get Name of Object which is used for html tag id and name.
|
#
|
public
|
setValue(String $val)
Set Value of Controls which is used for html output.<br>
txtName = new TextField();<br>
txtName->setValue="Ram";<br>…
|
#
|
public
|
getValue()
|
#
|
public
|
setDefaultValue(string|json|mixed $val)
Set Default Value
It will over write value of component if
component is not submit by browser and it is empty.
Set Default Value
It will over write value of component if
component is not submit by browser and it is empty.
|
#
|
public
|
getDefaultValue()
|
#
|
public
|
setTagName(string $param)
Set HTML Tag Name
|
#
|
public
|
setPreTag(string $val)
Set HTML pre Tag. This HTML code will display before component Tag.
Set HTML pre Tag. This HTML code will display before component Tag.
|
#
|
public
|
addPreTag(string $val)
Add(Concatenate) HTML pre Tag in previous pre tag.
This HTML code will display before component Tag.
Add(Concatenate) HTML pre Tag in previous pre tag.
This HTML code will display before component Tag.
|
#
|
public
|
getPreTag()
|
#
|
public
|
setPostTag(string $val)
Set HTML post Tag. This HTML code will display after component Tag.
Set HTML post Tag. This HTML code will display after component Tag.
|
#
|
public
|
addPostTag(string $val)
Add(Concatenate) HTML post Tag in previous post tag.
This HTML code will display after component Tag.
Add(Concatenate) HTML post Tag in previous post tag.
This HTML code will display after component Tag.
|
#
|
public
|
getPostTag()
|
#
|
public
|
setInnerPreTag(string $val)
Set HTML pre Tag for children.
This HTML code will display before any component children Tags.
Set HTML pre Tag for children.
This HTML code will display before any component children Tags.
|
#
|
public
|
getAttributes(): array
Get All attributes of Tag
Get All attributes of Tag
|
#
|
public
|
getAttribute(string $name): string
Read Attribute of Tag
|
#
|
public
|
setAttribute(string $name, string $val)
Set Attribute of Tag
$div1->setAttribute('style','color: #ff6789');
Set Attribute of Tag
$div1->setAttribute('style','color: #ff6789');
Parameters
|
#
|
public
|
removeAttribute(string $name)
Remove Attribute
|
#
|
public
|
setAttributeDefault(string $name, string $val)
Set Attribute of Tag if value is empty
$div1->setAttribute('style','color: #ff6789');
Set Attribute of Tag if value is empty
$div1->setAttribute('style','color: #ff6789');
Parameters
|
#
|
public
|
setInnerHTML(string $val)
Set Inner HTML of Tag
|
#
|
public
|
getInnerHTML()
|
#
|
public
|
appendHTML(NodeTag $html)
Append HTML code
|
#
|
public
|
wrapTag(string $tagname): NodeTag
Wrap Tag with valid HTML Tag
Wrap Tag with valid HTML Tag
|
#
|
public
|
wrapInnerTags(string $tagname): NodeTag
Wrap Children Tags with valid HTML Tag Name
Wrap Children Tags with valid HTML Tag Name
|
#
|
public
|
setVisible()
|
#
|
public
|
unsetVisible()
|
#
|
public
|
getVisible()
|
#
|
public
|
setUnAuth(string $param)
Not Render if match
Parameters
$param |
Comma separated authentication list
|
|
#
|
public
|
setAuth(string $param)
Not Render if not match
Parameters
$param |
Comma separated authentication list
|
|
#
|
public
|
setrender($permis = "")
Not Render if not match
|
#
|
public
|
unsetrender($permis = "")
Not Render if match
|
#
|
public
|
getrender()
|
#
|
public
|
setrenderTag(string $permis = "")
Not Render Tag if not match
Not Render Tag if not match
Parameters
$permis |
Comma separated permission list
|
|
#
|
public
|
unsetrenderTag(string $permis = "")
Not Render Tag if match
Parameters
$permis |
Comma separated permission list
|
|
#
|
public
|
getrenderTag()
|
#
|
public
|
setDataType($val)
|
#
|
public
|
getDataType()
|
#
|
public
|
setDataBound()
|
#
|
public
|
unsetDataBound()
|
#
|
public
|
getDataBound()
|
#
|
public
|
setDontFill(string $permis = "")
Not Auto Fill with viewData method if match
Not Auto Fill with viewData method if match
Parameters
$permis |
Comma separated permission list
|
|
#
|
public
|
unsetDontFill(string $permis = "")
Not Auto Fill with viewData method if not match
Not Auto Fill with viewData method if not match
Parameters
$permis |
Comma separated permission list
|
|
#
|
public
|
getDontFill()
|
#
|
public
|
setDontSubmit(string $permis = "")
Not Submit if match
Parameters
$permis |
Comma separated permission list
|
|
#
|
public
|
unsetDontSubmit(string $permis = "")
Not Submit if not match
Parameters
$permis |
Comma separated permission list
|
|
#
|
public
|
getDontSubmit()
|
#
|
public
|
getDontInsert()
|
#
|
public
|
setDontInsert(string $permis = "")
Not Insert with inserData if match
Not Insert with inserData if match
Parameters
$permis |
Comma separated permission list
|
|
#
|
public
|
unsetDontInsert(string $permis = "")
Not Insert with inserData if not match
Not Insert with inserData if not match
Parameters
$permis |
Comma separated permission list
|
|
#
|
public
|
getDontUpdate()
|
#
|
public
|
setDontUpdate(string $permis = "")
Not Update with updateData if match
Not Update with updateData if match
Parameters
$permis |
Comma separated permission list
|
|
#
|
public
|
unsetDontUpdate(string $permis = "")
Not Update with updateData if not match
Not Update with updateData if not match
Parameters
$permis |
Comma separated permission list
|
|
#
|
public
|
getEndTag()
|
#
|
public
|
setEndTag()
Enable Closing Tag
|
#
|
public
|
unsetEndTag()
Disable Closing Tag
|
#
|
public
|
setHTMLName($val)
Set HTML Tag Name Attribute
Set HTML Tag Name Attribute
|
#
|
public
|
setHTMLID($val)
Set HTML Tag ID Attribute
Set HTML Tag ID Attribute
|
#
|
public
|
setPathRes($val)
|
#
|
public
|
getTempobj(): TempFile
Get Parent TempFile
|
#
|
public
|
setTempobj(TempFile $tempobj)
Advanced Method,Internal use
Advanced Method,Internal use
|
#
|
public
|
getChildren(): array
Get All Children Components. Only Component Tags are included as child and ignored normal HTML tags
Get All Children Components. Only Component Tags are included as child and ignored normal HTML tags
|
#
|
public
|
addChild(Control $child)
Add Child Component
|
#
|
public
|
setParameterA($name, $value)
|
#
|
public
|
getParameterA($name)
|
#
|
public
|
getParentControl(): Control
Get Parent Control if any or null
Get Parent Control if any or null
|
#
|
protected
|
registerEvent(string $event_name)
Regsiter Event for Object which uses for Event Driven Programming.
Regsiter Event for Object which uses for Event Driven Programming.
|
#
|
protected
|
isRegisterHandler($event_name)
|
#
|
public
|
setEventHandler(string $event_name, string $handler, object $eventhandlerobj = "null")
Set Event Handler of Component.
This is Registered Event in component which can handle by application.
Set Event Handler of Component.
This is Registered Event in component which can handle by application.
Parameters
$event_name |
Event Name to handle
|
$handler |
Name of Function or Method that handle event
|
$eventhandlerobj |
Optional Object handle the event
|
|
#
|
protected
|
raiseEvent($event_name, $arglst = [])
|
#
|
protected
|
registerEventJS($event_name)
|
#
|
protected
|
isRegisterHandlerJS($event_name)
|
#
|
public
|
setEventHandlerJS(string $event_name, string $handler, object $eventhandlerobj = "null")
Set Event Handler for JS Code
Set Event Handler for JS Code
Parameters
$event_name |
Event Name to handle
|
$handler |
Name of JS Function that handle event
|
$eventhandlerobj |
Optional not supported
|
|
#
|
protected
|
raiseEventJS(string $event_name, array $arglst = []): string
Generate JS Code to call event handler which
is set by setEventHandlerJS method.
Generate JS Code to call event handler which
is set by setEventHandlerJS method.
|
#
|
public
|
submitAjax(type $eventName, type $url = "", type $extracomp = "")
Submit Component value via Ajax Request and it
generate all required JS code automatically.
in temp file use:-…
Submit Component value via Ajax Request and it
generate all required JS code automatically.
in temp file use:- funsubmitAJAX="click,|index-p1.html,|textarea1,textbox1"
Parameters
$eventName |
JS Event Name
|
$url |
Optional Default=page_event_compname_$eventName URL to post data
|
$extracomp |
Comma Separated list html id to send data
|
|
#
|
public
|
onJsEvent(string $eventName, string $handlerFunName = "", boolean $renderonce = false)
Parameters
$eventName |
JS Event Name
|
$handlerFunName |
JS Function to handle Event
|
$renderonce |
Optional default=false, true=ignore on ajax request
|
|
#
|
public
|
addHeaderJSFunctionCode(string $funname, string $name, string $code, boolean $renderonce = false)
This function only work if JS Function as also created by addHeaderJSFunction.
This function only work if JS Function as also created by addHeaderJSFunction.
Parameters
$funname |
JS Function name where code need to insert
|
$name |
JS code block id
|
$code |
JS Code to insert into JS Function
|
$renderonce |
Optional default=false, true=ignore on ajax request
|
|
#
|
public
|
addAsJSVar()
Add Component as JS variable part of TempFile JS Object.
HTML Name of component used as variable name in JS code. By…
Add Component as JS variable part of TempFile JS Object.
HTML Name of component used as variable name in JS code. By default it
is same as tag id.
in JS you can get Component object as temp1.getComponent('txtname');
|
#
|
public
|
setAsJSVar(string $jscode): string
Set Component as JS variable part of TempFile JS Object. Remember not all component
will automatically create js…
Set Component as JS variable part of TempFile JS Object. Remember not all component
will automatically create js object. It is created by component code. If component
developer doesn't offer JS integration then there are no any JS object.
in JS you can set Component object as temp1.setComponent('txtname','$jscode');
Parameters
$jscode |
JS Code as String
|
Returns
|
#
|
public
|
getAsJSVar(): string
Get Component as JS Variable.
return code like temp1.getComponent('txtname');
Get Component as JS Variable.
return code like temp1.getComponent('txtname');
Returns
|
#
|
protected
|
bindJSEvent(string $selector, string $eventName, string $handlerFunName = "", boolean $renderonce = false)
Bind with any JS Event with $handlerFunName.
It generate all required JS code and add into jQuery ready handler.
Bind with any JS Event with $handlerFunName.
It generate all required JS code and add into jQuery ready handler.
Parameters
$selector |
jQuery selector
|
$eventName |
JS Event Name
|
$handlerFunName |
JS function name for handling event.
|
$renderonce |
Optional default=false, true=ignore on ajax request
|
|
#
|
protected
|
bindJSObjEvent(
string $selector,
string $obj,
string $eventName,
string $handlerFunName = "",
boolean $renderonce = false,
)
Bind with any JS Object Event(NON DOM Events) with $handlerFunName.
For Example:- Bind with activate event of…
Bind with any JS Object Event(NON DOM Events) with $handlerFunName.
For Example:- Bind with activate event of bootstrap Tab
$this->bindJSObjEvent("#tabeditor","tabs","activate","comp_tabeditor_activate");
It generate all required JS code and add into jQuery ready handler.
Parameters
$selector |
jQuery selector
|
$obj |
JS Object variable name
|
$eventName |
JS Object Event Name
|
$handlerFunName |
JS function name for handling event.
|
$renderonce |
Optional default=false, true=ignore on ajax request
|
|
#
|
public
|
parseHTML(string $html): string
Prase HTML string and trigger onprase event for each node
Prase HTML string and trigger onprase event for each node
Returns
process html by onprocess callback
|
#
|
final
public
|
getHelp()
|
#
|
final
public
|
render()
|
#
|
final
public
|
prerender()
|
#
|
final
public
|
oncompinit($element)
|
#
|
final
public
|
oncompcreate($element)
|
#
|
public
|
loadScript(string $php): string
Advance Function
Execute PHP and return result with eval.
Global variables are not available, only component object…
Advance Function
Execute PHP and return result with eval.
Global variables are not available, only component object and its public variables are available
|
#
|
public
|
executePHPCode(string &$strPHPCode): string
Advance Function
Execute PHP and return result with eval.
Global variables are not available, only component object…
Advance Function
Execute PHP and return result with eval.
Global variables are not available, only component object and its public variables are available
|
#
|
public
|
getDynamicContent(string $filepath): string
Advance Function
Read file and process PHP and return result.
Global variables are not available, only component…
Advance Function
Read file and process PHP and return result.
Global variables are not available, only component object and its public variables are available
Parameters
|
#
|
public
|
addDynamicFileLink(type $fileURL2, type $renderonce = false, type $filename = "", type $ext = "", type $ver = "0")
Process PHP in Dynamic CSS,JS File and add as url Link. When
\SphpBase::sphp_settings()->translatermode = true then…
Process PHP in Dynamic CSS,JS File and add as url Link. When
\SphpBase::sphp_settings()->translatermode = true then
framework generate file under cache folder. For Example:- CSS Theme component
generate new theme according to settings as a public variables of component.
|
#
|
public
|
oninit()
override this event handler in your Component to handle it.
trigger when Component initialize
override this event handler in your Component to handle it.
trigger when Component initialize
Overriden by
|
#
|
public
|
oncreate(NodeTag $element)
override this event handler in your Component to handle it.
trigger when Component Create
override this event handler in your Component to handle it.
trigger when Component Create
Parameters
$element |
A HTML element of component
|
Overriden by
|
#
|
public
|
onaftercreate()
override this event handler in your Component to handle it.
trigger when Component AfterCreate
override this event handler in your Component to handle it.
trigger when Component AfterCreate
Overriden by
|
#
|
public
|
onappevent()
override this event handler in your Component to handle it.
trigger when Component Get Application ready Event as…
override this event handler in your Component to handle it.
trigger when Component Get Application ready Event as AppEvent
|
#
|
public
|
renderLast()
override this event handler in your Component to handle it.
trigger when Component RenderLast After all children render
override this event handler in your Component to handle it.
trigger when Component RenderLast After all children render
|
#
|
public
|
onprerender()
override this event handler in your Component to handle it.
trigger when Component PreRender before Render
override this event handler in your Component to handle it.
trigger when Component PreRender before Render
Overriden by
|
#
|
public
|
onprejsrender()
override this event handler in your Component to handle it.
trigger when Component PreJsRender before PreRender
override this event handler in your Component to handle it.
trigger when Component PreJsRender before PreRender
Overriden by
|
#
|
public
|
onrender()
override this event handler in your Component to handle it.
trigger when Component Render Before RenderLast
override this event handler in your Component to handle it.
trigger when Component Render Before RenderLast
Overriden by
|
#
|
public
|
onjsrender()
override this event handler in your Component to handle it.
trigger when Component JsRender before Render
override this event handler in your Component to handle it.
trigger when Component JsRender before Render
Overriden by
|
#
|
public
|
onchildevent(string $event, Control $obj)
override this event handler in your Component to handle it.
trigger when Component Children Events
override this event handler in your Component to handle it.
trigger when Component Children Events
Parameters
$event |
Name of Event
|
$obj |
Child Component
|
Overriden by
|
#
|
public
|
onholder(NodeTag $obj)
override this event handler in your Component to handle it.
trigger when runas holder bind with component
override this event handler in your Component to handle it.
trigger when runas holder bind with component
Overriden by
|
#
|
public
|
onparse(string $event, NodeTag $element)
Advance Function
override this event handler in your Component to handle it.
trigger when component parse manually
Advance Function
override this event handler in your Component to handle it.
trigger when component parse manually
Overriden by
|
#
|
public
|
setClassPath()
Advance Function, Internal use
Advance Function, Internal use
|
#
|
public
|
init($name = "", $fieldName = "", $tableName = "")
Advance Function, Internal use
Advance Function, Internal use
|
#
|
protected
|
addHelpPropList(
string $name,
string $help = '',
string $val = '',
string $param = '',
string $type = '',
string $options = '',
)
Add Help for Component
Parameters
$name |
prop name
|
$help |
Help text
|
$val |
value list
|
$type |
Data Type
|
|
#
|
protected
|
addHelpPropFunList(
string $name,
string $help = '',
string $val = '',
string $param = '',
string $type = '',
string $options = '',
)
Add Help for Component
Parameters
$name |
function name
|
$help |
Help text
|
$val |
value list
|
$type |
Data Type
|
|
#
|
public
|
helpPropList()
Advance Function, Internal use
Advance Function, Internal use
|
#
|
protected
|
genhelpPropList()
Advance Function, Internal use
Advance Function, Internal use
Overriden by
|
#
|