Component Condition

The Condition component is represented by the icon: and can control the flow of execution tree.

To modify the behavior of a Condition component, double click on the component name located in the central workspace, it opens a popup window called "Component Configuration Window". The following figure shows the window for the component:




The first field of the window shown in the figure above is a field called "Name Component", in this you can enter a name for the component. The second field allows you to enter conditions in php, default php code is:


 /****Condition Component****/  
 return (1==1);  

The above code evaluates a condition that is always true one is equal to one. You can change this condition to determine whether to run the components successors Condition component. The following are examples of using the component:


 return (isset($data_flow['user_register']));  
 return ($_GET['section']=='contact');  
 return ($_POST['ip']!=='127.0.0.1');  

At the bottom of the window are three buttons appear: Save, Apply, Cancel. The Save button: Saves the changes made to the component and close the window. The Apply button: Saves the changes made to the component without closing the window. The Cancel button: Closes the window without saving changes to the component.

No hay comentarios:

Publicar un comentario