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):

NameSpanish translationDescription
requiredObligatorioToggle required
widthAnchoWidth of input edit control
titleTítuloTitle of content's window
contentswidthAncho del contenidoWidth of content's window
contentsheightAlto del contenidoHeight of content's window
customcontentContenido personalizadoURL of content's window
SQLSQLSelect statement that builds the tree to show
individualSQLSQL IndividualSelect statement that shows description instead of id
deeplimitLímite de recursividadDepth of recursivity, useful in circular dependencies
allowanyselectionPermitir cualquier selecciónPermits to select an element that has childs nodes
allownewelementPermitir nuevo elementoPermits to add an element to the tree
newelementurlURL del nuevo elementoURL of new element window

The main setting

Lets imagine you have two entities called "Categories" and "Articles" that looks like this:

CategoryIdCategoryDescriptionCategoryParentId
1Mouse
2Optical1
3Wheel1
4Monitor
5Led4
617"5
ArticleIdArticleDescriptionCategoryId
1H4453E722
2U8899RTY6

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

Email

Message

My mailmaritoivan@yahoo.com