| Methods |
public
|
fu_setStyler(int $styler)
Set Styler for multi layout html output.
Set Styler for multi layout html output.
|
#
|
public
|
fi_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
|
fu_setValue(String $val)
Set Value of Components which is used for html output.<br>
txtName = new TextField();<br>
txtName->setValue="Ram";<br>…
|
#
|
public
|
fu_setUnAuth(string $param)
Not Render if match
Parameters
| $param |
Comma separated authentication list
|
|
#
|
public
|
fu_setAuth(string $param)
Not Render if not match
Parameters
| $param |
Comma separated authentication list
|
Overriden by
|
#
|
public
|
fu_setrender($permis = "")
Not Render if not match
|
#
|
public
|
fu_unsetrender($permis = "")
Not Render if match
|
#
|
public
|
fu_setrenderTag(string $permis = "")
Not Render Tag if not match
Not Render Tag if not match
Parameters
| $permis |
Comma separated permission list
|
|
#
|
public
|
fu_unsetrenderTag(string $permis = "")
Not Render Tag if match
Parameters
| $permis |
Comma separated permission list
|
|
#
|
public
|
fi_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
|
fi_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
|
fi_setDontSubmit(string $permis = "")
Not Submit if match
Parameters
| $permis |
Comma separated permission list
|
|
#
|
public
|
fi_unsetDontSubmit(string $permis = "")
Not Submit if not match
Parameters
| $permis |
Comma separated permission list
|
|
#
|
public
|
fi_setDontInsert(string $permis = "")
Not Insert with inserData if match
Not Insert with inserData if match
Parameters
| $permis |
Comma separated permission list
|
|
#
|
public
|
fi_unsetDontInsert(string $permis = "")
Not Insert with inserData if not match
Not Insert with inserData if not match
Parameters
| $permis |
Comma separated permission list
|
|
#
|
public
|
fi_setDontUpdate(string $permis = "")
Not Update with updateData if match
Not Update with updateData if match
Parameters
| $permis |
Comma separated permission list
|
|
#
|
public
|
fi_unsetDontUpdate(string $permis = "")
Not Update with updateData if not match
Not Update with updateData if not match
Parameters
| $permis |
Comma separated permission list
|
|
#
|
public
|
fu_setHTMLName($val)
Set HTML Tag's Name Attribute, By Default it will be empty.
Set HTML Tag's Name Attribute, By Default it will be empty.
|
#
|
public
|
fu_setHTMLID($val)
Set HTML Tag ID Attribute, By Default it will be use object name.
If ref-object is used then only main object will set…
Set HTML Tag ID Attribute, By Default it will be use object name.
If ref-object is used then only main object will set id from name of object.
|
#
|
public
|
fu_submitAjax(type $eventName, type $url = "", type $extracomp = "")
Submit Component value via Ajax Request and it
generate all required JS code automatically.
in front file use:-…
Submit Component value via Ajax Request and it
generate all required JS code automatically.
in front 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 tag id or class with prefix . to send data
|
|
#
|
public
|
fu_submitWS(
string $eventName,
string $host = "",
string $extracomp = "",
string $gate = "main",
string $evt = "",
string $evtp = "",
)
Submit Component value via WS Request and it
generate all required JS code automatically.
in front file use:-…
Submit Component value via WS Request and it
generate all required JS code automatically.
in front file use:- funsubmitWS="click,|domain:8084,|textarea1,textbox1,|aigen,|picture"
Parameters
| $eventName |
JS Event Name
|
| $host |
Optional Default=find socket in page to post data, it will ignore if socket already exist.
|
| $extracomp |
Comma Separated list html id to send data
|
| $gate |
Gate of native Gate to submit data
|
| $evt |
Event of native Gate to trigger
|
| $evtp |
Event Parameter to pass any data
|
|
#
|
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
|
getValue()
|
#
|
public
|
getSqlSafeValue(): string
escape single or double quotation in value. This don't need DB Connection.
It is not escape sql characters. Use…
escape single or double quotation in value. This don't need DB Connection.
It is not escape sql characters. Use dbEngine->cleanQuery() for properly safe value but
it need db connection.
|
#
|
public
|
setFromDatabase(array $row)
Set Value From Database Row, only if dfield set. This function don't know table name,
So it is not safe like page_view…
Set Value From Database Row, only if dfield set. This function don't know table name,
So it is not safe like page_view. It will give error if field not exist in row.
Parameters
| $row |
Associative array from DB table
|
|
#
|
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
|
getrender()
|
#
|
public
|
getrenderTag()
|
#
|
public
|
setDataType($val)
|
#
|
public
|
getDataType()
|
#
|
public
|
bindToTable(string $table = "", string $field = "")
Bind Component with Database
Bind Component with Database
Parameters
| $table |
Optional DB Table name
|
| $field |
Optional DB Table Field name
|
|
#
|
public
|
setDataBound()
|
#
|
public
|
unsetDataBound()
|
#
|
public
|
getDataBound()
|
#
|
public
|
hasDatabaseBinding(): boolean
Check if Component is bind with Database
Check if Component is bind with Database
|
#
|
public
|
getDontFill()
|
#
|
public
|
getDontSubmit()
|
#
|
public
|
getDontInsert()
|
#
|
public
|
getDontUpdate()
|
#
|
public
|
getEndTag()
|
#
|
public
|
setEndTag()
Enable Closing Tag
|
#
|
public
|
unsetEndTag()
Disable Closing Tag
|
#
|
public
|
setPathRes($val)
|
#
|
public
|
getFrontobj(): FrontFile
Get Parent FrontFile
|
#
|
public
|
getChildren(): array
Get Children Components Only First Level. Only Component Tags are included as child and
ignored normal HTML tags.
Get Children Components Only First Level. Only Component Tags are included as child and
ignored normal HTML tags.
|
#
|
public
|
getAllChildren(): array
Get All Children Components All Levels. Only Component Tags are included as child and
ignored normal HTML tags.
Get All Children Components All Levels. Only Component Tags are included as child and
ignored normal HTML tags.
|
#
|
public
|
getParentComponent(): Component
Get Parent Component if any or null
Get Parent Component 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 Gate.
Set Event Handler of Component.
This is Registered Event in component which can handle by Gate.
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
|
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 FrontFile JS Object.
HTML Name of component used as variable name in JS code. By…
Add Component as JS variable part of FrontFile 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 front1.getComponent('txtname');
|
#
|
public
|
setAsJSVar(string $jscode): string
Set Component as JS variable part of FrontFile JS Object. Remember not all component
will automatically create js…
Set Component as JS variable part of FrontFile 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 front1.setComponent('txtname','$jscode');
Parameters
| $jscode |
JS Code as String
|
Returns
|
#
|
public
|
getAsJSVar(): string
Get Component as JS Variable.
return code like front1.getComponent('txtname');
Get Component as JS Variable.
return code like front1.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
|
|
#
|
protected
|
createFrontObjectShare(string $filepath, bool $blnStringData = false): FrontFile
Create Front File Object and Share All Components with Parent File and also add all components
as children of parent…
Create Front File Object and Share All Components with Parent File and also add all components
as children of parent Components.
Parameters
| $filepath |
File Path of Front File or String
|
| $blnStringData |
Optional True mean use string rather then filepath
|
|
#
|
protected
|
createFrontObjectPrivate(string $filepath, bool $blnStringData = false): FrontFile
Create Front File Object in Private Space. Nothing Share with Parent Front File.
Create Front File Object in Private Space. Nothing Share with Parent Front File.
Parameters
| $filepath |
File Path of Front File or String
|
| $blnStringData |
Optional True mean use string rather then filepath
|
|
#
|
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()
|
#
|
protected
|
executePHPCode(string &$strPHPCode): string
Advance Function
Execute Limited PHP Code for Template tags ##{} #{}#.
Global variables are not available, only…
Advance Function
Execute Limited PHP Code for Template tags ##{} #{}#.
Global variables are not available, only component object $compobj and its public variables are available
Parameters
| $strPHPCode |
Template code
|
|
#
|
protected
|
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.
|
#
|
protected
|
oninit()
override this Life-Cycle event handler in your Component to handle it.
trigger when Component initialize and before…
override this Life-Cycle event handler in your Component to handle it.
trigger when Component initialize and before any children Components initialize. You can set default values of Component
in this event handler.
Overriden by
|
#
|
protected
|
oncreate(NodeTag $element)
override this Life-Cycle event handler in your Component to handle it.
trigger when Component Create and before any…
override this Life-Cycle event handler in your Component to handle it.
trigger when Component Create and before any children components Create event.
We can read all static attributes and "fui-_*"
dynamic attributes set in FrontFile. So you can decide your default values or
calculate or validate request submit in this handler.
Parameters
| $element |
A HTML element of component
|
Overriden by
|
#
|
protected
|
onaftercreate()
override this Life-Cycle event handler in your Component to handle it.
trigger when All Components of FrontFile is…
override this Life-Cycle event handler in your Component to handle it.
trigger when All Components of FrontFile is created. If Component
settings or input dependent on other components of FrontFile or
it's children Components then we can use this handler to work further. For
Example our component need to read Page Title when it find Title Component in
FrontFile.
Overriden by
|
#
|
protected
|
ongateevent()
override this Life-Cycle event handler in your Component to handle it.
trigger when Component Get Gate ready Event as…
override this Life-Cycle event handler in your Component to handle it.
trigger when Component Get Gate ready Event as GateEvent. Trigger after
Gate onrun event.
In this event handler Component can handle it's own PageEvents and reply AJAX directly
to Browser and reduce the work Gate and developer. But this will work only if FrontFile
Object is created on Gate Life-Cycle event handler onstart.
|
#
|
protected
|
onprejsrender()
override this Life-Cycle event handler in your Component to handle it.
trigger before onprerender,onjsrender,onrender…
override this Life-Cycle event handler in your Component to handle it.
trigger before onprerender,onjsrender,onrender and before any children Components event PreJsRender and PreRender.
This will not work if Front File not Render or disable Component rendering.
You can create JS Function with addHeaderJSFunction and then Children can write their code inside
this JS Function with addHeaderJSFunctionCode. You can divide your logic between various render
event handlers.
Overriden by
|
#
|
protected
|
onprerender()
override this Life-Cycle event handler in your Component to handle it.
trigger before onjsrender, onrender and…
override this Life-Cycle event handler in your Component to handle it.
trigger before onjsrender, onrender and PreRender of children Components.
write js,html code which help or need by children for further addition onrender
This will not work if Front File not Render or disable Component rendering.
Overriden by
|
#
|
protected
|
onjsrender()
override this Life-Cycle event handler in your Component to handle it.
trigger when Component before onrender and after…
override this Life-Cycle event handler in your Component to handle it.
trigger when Component before onrender and after children render. Mostly
use to write own JS code and links external js,css files.
This will not work if Front File not Render or disable Component rendering.
Overriden by
|
#
|
protected
|
onrender()
override this Life-Cycle event handler in your Component to handle it.
trigger when Component Render and Before…
override this Life-Cycle event handler in your Component to handle it.
trigger when Component Render and Before RenderLast. Mostly use to
write HTML layout,design or over-write children output
This will not work if Front File not Render or disable Component rendering.
Overriden by
|
#
|
protected
|
onpostrender()
override this Life-Cycle event handler in your Component to handle it.
trigger when Component Rendering Complete After…
override this Life-Cycle event handler in your Component to handle it.
trigger when Component Rendering Complete After all output is generated.
Use by Complex components. Use for Cleanup temporary resources and
Finalize output or control children components.
This will not work if Front File not Render or disable Component rendering.
|
#
|
protected
|
onchildevent(string $event, Component $obj)
override this event handler in your Component to handle it.
trigger on Children Component Events. Use for interaction…
override this event handler in your Component to handle it.
trigger on Children Component Events. Use for interaction between parent
child. So it is not Life-Cycle event. It will trigger by only first level of children.
Parameters
| $event |
Name of Event value may be oncreate,onprerender or onrender
|
| $obj |
Child Component
|
Overriden by
|
#
|
protected
|
onholder(NodeTag $obj)
override this event handler in your Component to handle it.
trigger when Runtime Attribute runas used with value of …
override this event handler in your Component to handle it.
trigger when Runtime Attribute runas used with value of "holder" and that pass \Sphp\tools\NodeTag
Tag Object to component and then Component can display any type of content on holder object.
With helper attribute only data-comp and leave data-prop.
So it is not Life-Cycle event.
Overriden by
|
#
|
protected
|
onparse(string $event, HTMLDOMNode $domelement)
Advance Function
override this event handler in your Component to handle it.
trigger when HTML text parse with…
Advance Function
override this event handler in your Component to handle it.
trigger when HTML text parse with parseHTML function.
Parameters
| $event |
value may be start or end.
|
Overriden by
|
#
|
public
&
|
__get($name)
|
#
|
final
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
|
#
|