AppIntegrator

Extends \CI_Controller

Manually Developed CI Controller

This controller facilitates the access of table countries

Usage:-

     function index()
     function AppIntegrator_wb()
     function key_validate(), Validates key entries
     function delete()
     function createDropdown()
     function is_name_uniqe(), Checks uniqness of a given name
     function edit(), Prepares edit form for a given record
     function save(), Saves add/edit form data
     function addForm(), Prepares add form to add new record
     function replace_para_maccro(), Replaces parameter maccro values with values
     function crosscheck_uaacs_functions(), Crossches with supplied function ids and user ids
     function prepare_xml_feed_functions(), Prepares functions obtaind from xml feed
     function prepare_function_paras(), Prepares function pars obtaind from xml feed
     function prepare_qstring_builder(), Prepares querystring builder popup
package

AIR\controllers\AppIntegrator

version

V1.2.0

copyright

2015, BizyCorp Internal Systems Development

license

private, All rights reserved

author

MRM Roshan

created

July 2014

uses
see
modified
modification

Methods

Function Abstract __construct

__construct() : void

This constructer function checks for user session and loads the relevant models

access

public

Function addForm ()

addForm() : void

This function loads AIR links add form with pre defined structure which also validates entered data when submitted

access

protected

since
modified

Jun 17, 2016 by Roshan Ruzaik mrmroshan@yahoo.com

modification

Fixed bug id 21882

AppIntegrator_wb()

AppIntegrator_wb() 

This method will call AIR work bench file for data listing and processing

Send to view - $data array with template id

check_xmlfeed_and_app_id()

check_xmlfeed_and_app_id() 

This function maks sure both xml feed and application ids are correct combination. accepts 2 query strings xml_feed_url and app_id

string xml_feed_url string app_id

createDropdown()

createDropdown(array $data = false) 

createDropdown is the component function. Its main functionality is to produce a dropdown with pre populated table data

Parameter list :-

$data['selectByValue'] => null - preselection of list items by value $data['selectBYText'] => null - preselection of list items by Text $data['filterBy'] => null - filter data set by a field or list $data['outFormat'] => 'html' - Format of the output like HTML,XML Etc $data['isMultiple'] => false - is the drop down with multi select capable $data['sort'] => 'asc' - sort list text Ascending or Descending $data['optionsOnly'] => false - Specify the controller that output only values

Usage :-

1) Format for internal functional call by passing data array

$data = array('selectByValue' => null, 'selectBYText' => null, 'outFormat' => 'html' , 'isMultiple' => false, 'sort' => 'asc', 'optionsOnly' => false, 'filterBy' => array( 'search_field' => 'T.status', 'search_text' => '0', 'query_method'=>'equal', 'order_by' => 'asc' ) )

2) Format of external call by URL

http://.../index.php/task_master/createDropdown/?sbv=null&sbt=null&format=html&multiple=false&sort=asc&filterby=status-0-equal

Description of parameter list,

sbv - selectByValue => null sbt - selectBYText => null format - outFormat => 'html' multiple - isMultiple=> false sort - sort => 'asc' filterby - filterBy => null optionsOnly - options only listing

Arguments

$data

array

data array to create dropdown

crosscheck_uaacs_functions($uaacs_functions_obj,$share_functions_obj )

crosscheck_uaacs_functions(object $uaacs_functions_obj, object $share_functions_obj, string $appType = null) : boolean

This function crosschechks all function ids of $share_functions_obj against $uaacs_functions_obj This function checks all function ids of share functions obj are present on uaacs functions object. if any one function id is missing this will return false

Arguments

$uaacs_functions_obj

object

$share_functions_obj

object

$appType

string

Response

boolean

Function delete ()

delete(string $id = null) : void

This function deletes given record by id

access

public

since
modified

Jun 17, 2016 by Roshan Ruzaik mrmroshan@yahoo.com

modification

Fixed bug id 20500,20499,20501

Arguments

$id

string

Function edit ()

edit(string $ids = null, string $form_lable = null) : void
access

public

since
modified

Jun 17, 2016 by Roshan Ruzaik mrmroshan@yahoo.com

modification

Fixed bug id 21212

Arguments

$ids

string

$form_lable

string

index() method

index( $search = FALSE,  $limit,  $offset,  $file = 'appIntegrator_grid_index',  $format = 'xml') : array

This is the main function that produce the AIR listings output using various view formats passed as params.

access

public

Arguments

$search

$limit

$offset

$file

$format

Response

array

data feed for grid

is_name_uniqe($id,$name)

is_name_uniqe(integer $id, string $name) 

This method checks for uniqeness of a given linkage name

Arguments

$id

integer

$name

string

key_validate($action,$key)

key_validate(string $action, array $key) : boolean|\multitype:string

This function checks for duplicate key entries

Arguments

$action

string

$key

array

Response

boolean|\multitype:string

prepare_function_paras($editUrl,$func_id)

prepare_function_paras(string $editUrl = null, string $func_id = null) 

This function prepares add/edit form with parameters fields after getting information from share_function xml feed

Arguments

$editUrl

string

$func_id

string

prepare_qstring_builder()

prepare_qstring_builder() 

This fuction prepares querystring builder popup. So then users can specify required querystrings along with the url. This function is called by AJAX

prepare_xml_feed_functions($editUrl,$editId)

prepare_xml_feed_functions(string $editUrl = null, string $editId = null) : string

This function prepares add/edit forms with proper form input elements after getting the share function xml feeds.

Arguments

$editUrl

string

$editId

string

Response

string

replace_para_maccro($matches)

replace_para_maccro(array $para) : array

This function is used for replacing macro variables (ex:-@@var@@) of $para data.

Arguments

$para

array

Response

array

save($action,$callback)

save(string $action = null, string $callback = null) : integer

This function save or update supplied data from add/edit form

Arguments

$action

string

$callback

string

Response

integer

new record id

Properties

$debug

debug : \boolien
var

Type(s)

\boolien

$log_obj

log_obj : \obj
var

Type(s)

\obj