saimod_sys_todo

Extends \SYSTEM\SAI\SaiModule

saimod_sys_todo Class provided by System as saimod to manage the system_todo, system_todo_assign table

package

SYSTEM\SAI

Methods

API Bug Call to report Bugs

call_bug(string $message, \SYSTEM\API\JSON $data) : null
inherited static

Arguments

$message

string

Bugreport Message

$data

\SYSTEM\API\JSON

Bugreport Data

Response

null

Returns JSON result with success/failure status

API Cache Call to request cached Data (usually js and css)

call_cache(integer $id, \SYSTEM\API\sha1 $ident) : mixed
inherited static

Arguments

$id

integer

Cache id to be queried

$ident

\SYSTEM\API\sha1

Cache ident to be queried

Response

mixed

Returns cached Data from Database

System run Cron Call

call_cron() : \SYSTEM\API\JSON
inherited static

Response

\SYSTEM\API\JSON

Returns JSON result with success/failure status

System File Request Call

call_files(string $cat, string $id = null) : mixed
inherited static

Arguments

$cat

string

File category

$id

string

File name

Response

mixed

Returns JSON result with failure status or streams the File

System State-Pages Request Call

call_pages(integer $group, string $state) : mixed
inherited static

Arguments

$group

integer

Page Group for Statesystem

$state

string

Full name of the State.

Response

mixed

Returns JSON result with data/failure status

System Text Request Call

call_text(mixed $request, \SYSTEM\API\lang $lang) : \SYSTEM\API\JSON
inherited static

Arguments

$request

mixed

Request String for Text API

$lang

\SYSTEM\API\lang

Request Language for given text

Response

\SYSTEM\API\JSON

Returns JSON result with data/failure status

Check if a todo_stats is valid

check_stats(string $stats) : boolean
static

Arguments

$stats

string

Classname of the todo_stats

Response

boolean

Returns true or false.

Default Page anchor to catch all calls not answered by the saimod api

default_page(string $_escaped_fragment_ = null) : string
inherited static

Arguments

$_escaped_fragment_

string

Param for Hashbangcrawling

Response

string

Returns HTML of the defaultpage

Save a Exception as ToDo in the Database This is used as Errorhandler in some form.

exception(\Exception $E, boolean $thrown, integer $type = \SYSTEM\SQL\system_todo::FIELD_TYPE_EXCEPTION) : boolean
static

Arguments

$E

\Exception

Exception to be saved

$thrown

boolean

Was the Exception thrown?

$type

integer

Type of the Todo(Exception)

Response

boolean

Returns false

Internal Function to generate the HTML for the todo list

generate_list(integer $state, string $filter, string $search, integer $page) : string
static

Arguments

$state

integer

Todo State

$filter

string

Category Filter

$search

string

Search Parameter

$page

integer

Page Number (returns only 100)

Response

string

Returns HTML

Get the Api Group this Api is operating on

get_apigroup() : integer
inherited static

Response

integer

Returns api group id.

API Class function - implement this function and return the Classname

get_class() : string
inherited static

Response

string

Returns your API-Class name

Get default state for this statesystem

get_default_state() : string
inherited static

Response

string

Returns name of the startstate.

Fixes Classnames for sai postfield

get_params(array $params) : array
inherited static

Arguments

$params

array

Params to be corrected

Response

array

Returns array of corrected Params.

Generate the <li> menu for the Saimod Override this

html_li_menu() : string
inherited static

Response

string

Returns HTML of the

  • menu for the Saimod

  • Get all js System Paths required for this Saimod

    js() : array
    static

    Response

    array

    Returns array of Pathobjects pointing to the saimods js

    Register a todo_stats

    register(string $stats) : null
    static

    Arguments

    $stats

    string

    Classname of the todo_stats

    Response

    null

    Returns null.

    Save a Report to the ToDo Database

    report(string $message, \SYSTEM\SAI\array/JSON $data) : \SYSTEM\SAI\JSON
    static

    Arguments

    $message

    string

    Message of the Report

    $data

    \SYSTEM\SAI\array/JSON

    Data for the Report

    Response

    \SYSTEM\SAI\JSON

    Returns json with status true

    Check public state for the Saimod.

    right_public() : boolean
    inherited static

    Override this

    Response

    boolean

    Returns true if the saimod is public

    Check rights for the Saimod.

    right_right() : boolean
    inherited static

    Override this

    Response

    boolean

    Returns true if accessable for the user else false

    Generate the HTML for the Saimods startpage

    sai_mod__SYSTEM_SAI_saimod_sys_todo() : string
    static

    Response

    string

    Returns HTML for the Saimods startpage

    Add a new Todo

    sai_mod__SYSTEM_SAI_saimod_sys_todo_action_add(string $todo) : \SYSTEM\SAI\JSON
    static

    Arguments

    $todo

    string

    text of the Todo

    Response

    \SYSTEM\SAI\JSON

    Returns Json with status ok

    Assign a Todo to the User

    sai_mod__SYSTEM_SAI_saimod_sys_todo_action_assign(integer $todo) : \SYSTEM\SAI\JSON
    static

    Arguments

    $todo

    integer

    Id of the Todo

    Response

    \SYSTEM\SAI\JSON

    Returns Json with status ok

    Close a Todo

    sai_mod__SYSTEM_SAI_saimod_sys_todo_action_close(integer $todo) : \SYSTEM\SAI\JSON
    static

    Arguments

    $todo

    integer

    Id of the Todo

    Response

    \SYSTEM\SAI\JSON

    Returns Json with status ok

    Close all Generated ToDos

    sai_mod__SYSTEM_SAI_saimod_sys_todo_action_close_all() : \SYSTEM\SAI\JSON
    static

    Response

    \SYSTEM\SAI\JSON

    Returns Json with status ok

    Deassign a Todo from the User

    sai_mod__SYSTEM_SAI_saimod_sys_todo_action_deassign(integer $todo) : \SYSTEM\SAI\JSON
    static

    Arguments

    $todo

    integer

    Id of the Todo

    Response

    \SYSTEM\SAI\JSON

    Returns Json with status ok

    Generate the HTML for the list of closed Todos

    sai_mod__SYSTEM_SAI_saimod_sys_todo_action_dotolist(string $filter = 'all', string $search = '%', integer $page) : string
    static

    Arguments

    $filter

    string

    Category Filter

    $search

    string

    Search Parameter

    $page

    integer

    Page Number (returns only 100)

    Response

    string

    Returns HTML

    Edit the message of a Todo

    sai_mod__SYSTEM_SAI_saimod_sys_todo_action_edit(integer $todo, string $message) : \SYSTEM\SAI\JSON
    static

    Arguments

    $todo

    integer

    Id of the Todo

    $message

    string

    Message for the Todo

    Response

    \SYSTEM\SAI\JSON

    Returns Json with status ok

    Generate the HTML for the form to add a new Todo

    sai_mod__SYSTEM_SAI_saimod_sys_todo_action_new() : string
    static

    Response

    string

    Returns HTML

    Open a Todo

    sai_mod__SYSTEM_SAI_saimod_sys_todo_action_open(integer $todo) : \SYSTEM\SAI\JSON
    static

    Arguments

    $todo

    integer

    Id of the Todo

    Response

    \SYSTEM\SAI\JSON

    Returns Json with status ok

    Decrease the Priority of a Todo

    sai_mod__SYSTEM_SAI_saimod_sys_todo_action_priority_down(integer $todo) : \SYSTEM\SAI\JSON
    static

    Arguments

    $todo

    integer

    Id of the Todo

    Response

    \SYSTEM\SAI\JSON

    Returns Json with status ok

    Increase the Priority of a Todo

    sai_mod__SYSTEM_SAI_saimod_sys_todo_action_priority_up(integer $todo) : \SYSTEM\SAI\JSON
    static

    Arguments

    $todo

    integer

    Id of the Todo

    Response

    \SYSTEM\SAI\JSON

    Returns Json with status ok

    Generate the HTML for the statistics of the ToDos

    sai_mod__SYSTEM_SAI_saimod_sys_todo_action_stats() : string
    static

    Response

    string

    Returns HTML

    Calculate the Stats of assigned ToDos

    sai_mod__SYSTEM_SAI_saimod_sys_todo_action_stats_name_assigned(string $filter) : \SYSTEM\SAI\JSON
    static

    Arguments

    $filter

    string

    Filter for the Calculation

    Response

    \SYSTEM\SAI\JSON

    Returns Json with stats data

    Calculate the Stats of closed ToDos

    sai_mod__SYSTEM_SAI_saimod_sys_todo_action_stats_name_closed(string $filter) : \SYSTEM\SAI\JSON
    static

    Arguments

    $filter

    string

    Filter for the Calculation

    Response

    \SYSTEM\SAI\JSON

    Returns Json with stats data

    Returns the HTML for a ToDo

    sai_mod__SYSTEM_SAI_saimod_sys_todo_action_todo(integer $todo) : string
    static

    Arguments

    $todo

    integer

    Id of the Todo

    Response

    string

    Returns HTML

    Generate the HTML for the list of open Todos

    sai_mod__SYSTEM_SAI_saimod_sys_todo_action_todolist(string $filter = 'all', string $search = '%', integer $page) : string
    static

    Arguments

    $filter

    string

    Category Filter

    $search

    string

    Search Parameter

    $page

    integer

    Page Number (returns only 100)

    Response

    string

    Returns HTML

    Internal Function to generate the text for Todo Status Open & Closed

    state(integer $state) : string
    static

    Arguments

    $state

    integer

    State of the Todo

    Response

    string

    Returns open or closed string

    Internal Function to generate the Buttons for Todo Status Open & Closed

    statebtn(integer $state) : string
    static

    Arguments

    $state

    integer

    State of the Todo

    Response

    string

    Returns the HTML of the open clase buttons

    Static Time-Parameter _ Call to avoid caching and API Errors for JS requests

    static__(mixed $_) : null
    inherited static

    Arguments

    $_

    mixed

    Anticaching Parameter of some Browsers

    Response

    null

    Returns nothing

    Static Call handler for Hashbang-Crawling Requests

    static__escaped_fragment_(string $_escaped_fragment_) : string
    inherited static

    Arguments

    $_escaped_fragment_

    string

    Hashbang-Encoded State

    Response

    string

    Returns your API-HTML result as HTML-Snapshot

    Static Call to change Language for the current Session/User

    static__lang(\SYSTEM\API\lang $lang) : null
    inherited static

    Arguments

    $lang

    \SYSTEM\API\lang

    Language requested

    Response

    null

    Returns nothing

    Static Call to change Result-Type for the current Session/User

    static__result(\SYSTEM\API\result $result) : null
    inherited static

    Arguments

    $result

    \SYSTEM\API\result

    Resulttype

    Response

    null

    Returns nothing

    Generates an array with values from all registered Todo Stats and Summary

    statistics() : array
    static

    Response

    array

    Returns array with todo stats

    Internal Function to generate the Trclass(color) for the Todo

    trclass(integer $type, string $class, integer $assignee, integer $userid) : string
    static

    Arguments

    $type

    integer

    Type of the Todo

    $class

    string

    Class of the Todo

    $assignee

    integer

    Userid of the assigned for this Todo

    $userid

    integer

    Userid of the Current logged in User

    Response

    string

    Returns the HTML of the open clase buttons

    Properties

    array Variable to store all registred todo_stats

    stats : 
    static

    Type(s)