Welcome to the MIB Arbol Plugin Page
This page contains a fully simple explanation about a PHPRunner plugin. The intention of making this object is to offer a new way of showing self-referenced entities in PHPRunner (in a treeview control) and also to contribute to make Xlinesoft Marketplace bigger.
This plugin is written entirely in PHP and CSS, using JAVASCRIPT JQUERY and two fantastic plugins: Treelistfilter and Filteringhighlight. The technique is perfectly explained by Xlinesoft in Creating your own Edit control plugin. Thank you very much, Sergey !
It's the first plugin I've made. I hope you to enjoy programming using this little tool, it will save you hours in front of your screen. Feel free to send your opinion.
You can view more MIB Plugins for PHPRunner soon.
Browser Compatibility
Written initially for PHPRunner 6.2. Tested until version 9.0 (compatible with PHPR 9.0 since Arbol 4.0).
It has been tested in the following browsers:
- Internet Explorer 8
- Internet Explorer 9
- FireFox 27
- Google Chrome 34
- Opera 12
Entity relationships
The relational model for database management is a database model based on first-order predicate logic, first formulated and proposed in 1969 by Edgar F. Codd. In the relational model of a database, all data is represented in terms of tuples, grouped into relations. A database organized in terms of the relational model is a relational database.
Hierarchical relationships
A hierarchical relationship allows for each child entity instance to store a reference to one parent entity instance. A parent entity instance can be referenced by an unlimited number of child entity instances. The parent entity instance can display all the child entity instances in an associated view.
Self-referential relationships
In a self-referential relationship, an entity has a relationship with itself. Hierarchical relationships can be self-referential. This allows entity instances to be directly associated with other entity instances of the same type. For example, an entity called "categories" can be linked to related "categories".
PHPRunner doesn't provide a treeview control as a built in feature to represent this kind of situations, so the edit control plugin and view control plugin MIB © Arbol covers this gap.
The first one lets you choose an element from a treeview, allowing you to filter an item by its content. The second one lets you see the current field's value in a treeview by clicking in the shown value.
If you want to represent a foreing key value that points to a self-referential entity, you can use it.
The initial parameters
As any other control plugin, you have to initialize it providing certain parameters to let the control to function properly as your needs.
Current version: 3.0. Now with multiselect capabilities !
In version 1.0, this parameters are (more incoming):
Name | Spanish translation | Description |
---|---|---|
required | Obligatorio | Toggle required |
width | Ancho | Width of input edit control |
title | Título | Title of content's window |
contentswidth | Ancho del contenido | Width of content's window |
contentsheight | Alto del contenido | Height of content's window |
customcontent | Contenido personalizado | URL of content's window |
SQL | SQL | Select statement that builds the tree to show |
individualSQL | SQL Individual | Select statement that shows description instead of id |
deeplimit | Límite de recursividad | Depth of recursivity, useful in circular dependencies |
allowanyselection | Permitir cualquier selección | Permits to select an element that has childs nodes |
allownewelement | Permitir nuevo elemento | Permits to add an element to the tree |
newelementurl | URL del nuevo elemento | URL of new element window |
The main setting
Lets imagine you have two entities called "Categories" and "Articles" that looks like this:
CategoryId | CategoryDescription | CategoryParentId |
---|---|---|
1 | Mouse | |
2 | Optical | 1 |
3 | Wheel | 1 |
4 | Monitor | |
5 | Led | 4 |
6 | 17" | 5 |
ArticleId | ArticleDescription | CategoryId |
---|---|---|
1 | H4453E72 | 2 |
2 | U8899RTY | 6 |
You could use MIB © Arbol to represent "CategoryId" field in "Articles" entity, setting "SQL" parameter as "SELECT CategoryId, CategoryDescription, CategoryParentId FROM Categories" to build a proper treeview control to show in your application. Please refer to "See it in action" and test by yourself.
Contact Mario
Name
Message
My mailmaritoivan@yahoo.com