Properties

$main_title

$main_title : string

Type

string — This is the title for layout view.

$main_tip

$main_tip : string

Type

string — This is the tip for layout view.

$icon

$icon : string

Type

string — This is the icon for layout view.

$version

$version : string

Type

string — This is the version for layout view.

$model

$model : string

Type

string — This is the model associated to the controller.

$create_view

$create_view : string

Type

string — This is the create view associated to the section.

$edit_view

$edit_view : string

Type

string — This is the edit view associated to the section.

$delete_view

$delete_view : string

Type

string — This is the delete view associated to the section.

$delete_title

$delete_title : string

Type

string — This is the delete title section.

$delete_msg

$delete_msg : string

Type

string — This is the delete message to the section.

$create_title

$create_title : string

Type

string — This is the create message to the section.

$edit_title

$edit_title : string

Type

string — This is the edit message to the section.

$breadcum

$breadcum : string

Type

string — This is the breadcrum element to the section.

$pre_breadcum

$pre_breadcum : string

Type

string — This is the previos breadcrum to the section.

Methods

__construct()

__construct() 

Constructor

_set_rules()

_set_rules(array  $items = array()) 

Set form validation

Parameters

array $items

Multidimensional array containing form elements information

_move_not_overwrite()

_move_not_overwrite(string  $source_file, string  $target_dir) 

Move upload file

Parameters

string $source_file

Source file

string $target_dir

Target

_get_data()

_get_data(array  $items = array()) : array

Parse POST data

Parameters

array $items

Multidimensional array containing form elements information

Returns

array

_get_item_data()

_get_item_data(array  $item) : array

Parse POST data

Parameters

array $item

Array containing form element information

Returns

array

_delete_msg()

_delete_msg(array  $data) : array

Adding dynamic data from private vars to inject into the view for section delete of the crud

Parameters

array $data

Array for inject into layout

Returns

array

_create_msg()

_create_msg(array  $data) : array

Adding dynamic data from private vars to inject into the view for section create of the crud

Parameters

array $data

Array for inject into layout

Returns

array

_edit_msg()

_edit_msg(array  $data) : array

Adding dynamic data from private vars to inject into the view for section edit of the crud

Parameters

array $data

Array for inject into layout

Returns

array

_get_fields()

_get_fields(array  $items = array(), null|array  $values = NULL, true|false  $view_only = FALSE) : array

Adding views to make form for sections create/edit/show of the crud

Parameters

array $items

Multidimensional array containing form elements information

null|array $values

Saved values for edit or show, null for create

true|false $view_only

Flag for show view

Returns

array

create()

create() 

Return layout view for create section of crud.

edit()

edit(integer  $id) 

Return layout view for edit section of crud.

Parameters

integer $id

ID

_edit()

_edit(string  $id, string  $back = '', string  $target = '', string  $ok = NULL) : mixed

Help edit method to return layout view for edit section of crud or to process submit for edit section.

Parameters

string $id

Primary key value

string $back

Segment url passed to base_url helper used to back when click on cancel button on delete section

string $target

Segment url passed to base_url helper used to go when click on submit button on delete section

string $ok

-

Returns

mixed

delete()

delete(integer  $id) 

Return layout view for delete section of crud.

Parameters

integer $id

ID

_delete()

_delete(string  $id, string  $back = '', string  $target = '', string  $ok = NULL, true|false  $wrap = TRUE) : mixed

Help delete method to return layout view for delete section of crud or to process submit for delete section.

Parameters

string $id

Primary key value

string $back

Segment url passed to base_url helper used to back when click on cancel button on delete section

string $target

Segment url passed to base_url helper used to go when click on submit button on delete section

string $ok

-

true|false $wrap

-

Returns

mixed

add_breadcum()

add_breadcum(string  $url, string  $text) 

Append new element to private var breadcum.

Parameters

string $url

Segment url passed to base_url helper

string $text

Label for link

add_pre_breadcum()

add_pre_breadcum(string  $url, string  $text) 

Append new element to private var pre_breadcum.

Parameters

string $url

Segment url passed to base_url helper

string $text

Label for link

show_template()

show_template(string  $view, null|array  $data = NULL, string  $template = 'templates/main') 

Load view into template with all dynamic data

Parameters

string $view

View route

null|array $data

Dynamic data to inject into layout & view

string $template

Layout route

_table()

_table(string  $toolbar = '', string  $items_key = 'table') 

Load crud table view

Parameters

string $toolbar

HTML buttons to inject on toolbar box

string $items_key

Key to read off config

_tree()

_tree(null|array  $content = NULL) 

Load tree view

Parameters

null|array $content

Content of tree

table()

table() 

Get JSON with table data

_get_items()

_get_items(string  $config) 

Load items for table or forms of the crud from config files

Parameters

string $config

Route of config to load

_ajax_table()

_ajax_table(string  $items_key = 'table') 

Return JSON to table crud

Parameters

string $items_key

Key to read off config

_callback_filter()

_callback_filter() 

This callback runs on query for table of the crud.

Use to add where clause on the query

_callback_row()

_callback_row(string  $key, mixed  $value, array  $row) : string

This callback runs on each row. It escapes the auto column value and runs the callback.

For this callback the return value is required and must be a string.

Parameters

string $key

Name of column

mixed $value

Value

array $row

Array containing all row data

Returns

string

index()

index() 

Redirect to swagger.

This controller don't need index section but to prevent errors do redirection to swagger folder.

createUser()

createUser() 

Create user

This operation is used to create a user into the system.

updateUser()

updateUser() 

Update user

This operation is used to update a user into the system.

deleteUser()

deleteUser() 

Delete user

This operation is used to update a user into the system.

Repository_CreateCategory()

Repository_CreateCategory() 

Create repository category

This operation is used to create a Category in Repository into the system.

Repository_UpdateCategory()

Repository_UpdateCategory() 

Update repository category

This operation is used to update a Category in Repository into the system.

Repository_DeleteCategory()

Repository_DeleteCategory() 

Delete repository category

This operation is used to delete a Category in Repository into the system.

UserRepo_CreateCategory()

UserRepo_CreateCategory() 

Create user repository category

This operation is used to create a Category in UserRepo into the system.

UserRepo_UpdateCategory()

UserRepo_UpdateCategory() 

Update user repository category

This operation is used to update a Category in UserRepo into the system.

UserRepo_DeleteCategory()

UserRepo_DeleteCategory() 

Delete user repository category

This operation is used to delete a Category in UserRepo into the system.

Repository_CreateDocument()

Repository_CreateDocument() 

Create repository document

This operation is used to create a Document in Repository into the system.

Repository_UpdateDocument()

Repository_UpdateDocument() 

Update repository document

This operation is used to update a Document in Repository into the system.

Repository_deleteDocument()

Repository_deleteDocument() 

Delete repository document

This operation is used to delete a Document in Repository into the system.

UserRepo_CreateDocument()

UserRepo_CreateDocument() 

Create user repository document

This operation is used to create a Document in UserRepo into the system.

UserRepo_UpdateDocument()

UserRepo_UpdateDocument() 

Update user repository document

This operation is used to update a Document in UserRepo into the system.

UserRepo_DeleteDocument()

UserRepo_DeleteDocument() 

Delete user repository document

This operation is used to delete a Document in UserRepo into the system.

getDocsInfo()

getDocsInfo() 

Get documents info

This operation is used to get all the data information of the documents of a user. Contains document details and categories.

getDocInfo()

getDocInfo() 

Get Document info.

This operation is used to get one document from one user.

getImage()

getImage() 

Get image.

This operation is used to get associated image of a document or category from one user.

getPrivateImage()

getPrivateImage() 

Get private image

This operation is used to get private image of a project from one user.

getGeneralImage()

getGeneralImage() 

Get general image.

This operation is used to get general image of a project from one user.

uploadInvoices()

uploadInvoices() 

Upload invoices

This operation is used to upload an invoices into the system.

activateInvoice()

activateInvoice() 

Activate invoice

This operation is used to activate invoice into the system.

deactivateInvoice()

deactivateInvoice() 

Deactivate invoice

This operation is used to deactivate invoice into the system.

associateDocument()

associateDocument() 

Associate Document

This operation is used to associate Document to user into the system.

disassociateDocument()

disassociateDocument() 

Disassociate document

This operation is used to disassociate Document to user from the system.

_create()

_create(string  $back = '', string  $target = '', string  $ok = NULL) : mixed

Help create method to return layout view for create section of crud or to process submit for create section.

Parameters

string $back

Segment url passed to base_url helper used to back when click on cancel button on delete section

string $target

Segment url passed to base_url helper used to go when click on submit button on delete section

string $ok

-

Returns

mixed

get_breadcum()

get_breadcum() : array

Get breadcrum dynamic array to inject into the view

Returns

array

get_menu()

get_menu() : array

Get menu dynamic array to inject into the view

Returns

array

_out()

_out(array  $data) 

Return JSON from array

Parameters

array $data

Array

_get_params()

_get_params(array  $names) 

Make associative array from get or post params

Parameters

array $names

Name of fields