class SettingsDialog

Properties

$ready_override
$instructor_override

Methods

__construct($container = false)

Construct us with with a container that has a settings trait and launch

ready()

Check if we are ready to go

instructor()

Check if the current user is an instructor

boolean
isSettingsPost()

Check for incoming settings post data

boolean
handleSettingsPost()

Handle incoming settings post data

buttonText($right = false)

Emit a properly styled "settings" button

button($right = false)

Emit a properly styled "settings" button

link($right = false)

Emit a properly styled "settings" link

attr()

Return the attributes to add to a tag to connect to activate the settings modal

start()

No description

end()

Finish the form output

select($name, $default = false, $fields = false)

Handle a settings selector box

text($name, $title = false)

Handle a settings text box

color($name, $title = false)

Handle a settings color box

number($name, $title = false)

Handle a settings number box

textarea($name, $title = false)

Handle a settings textarea box

checkbox($name, $title = false)

Handle a settings checkbox

getDueDate()

Get the due data data in an object

getDueDateDelta($time)

Show a due date delta in reasonable units

dueDate()

Emit the text and form fields to support due dates

done()

Emit the text and form fields to support the done option

Details

at line 27
__construct($container = false)

Construct us with with a container that has a settings trait and launch

$settingsDialog = new SettingsDialog($LAUNCH->link);

Parameters

$container

at line 41
ready()

Check if we are ready to go

at line 52
instructor()

Check if the current user is an instructor

at line 73
boolean isSettingsPost()

Check for incoming settings post data

Return Value

boolean Returns true if there were settings to handle and false if there was nothing done. Generally the calling tool will redirect when true is returned.

if ( $settingsDialog->isSettingsPost() ) {
    // Do form validation if you like
    $settingsDialog->handleSettingsPost();
    header( 'Location: '.U::addSession('index.php?howdysuppress=1') ) ;
    return;
}

at line 90
boolean handleSettingsPost()

Handle incoming settings post data

Return Value

boolean Returns true if there were settings to handle and false if there was nothing done. Generally the calling tool will redirect when true is returned.

if ( $settingsDialog->handleSettingsPost() ) {
    header( 'Location: '.U::addSession('index.php?howdysuppress=1') ) ;
    return;
}

at line 115
buttonText($right = false)

Emit a properly styled "settings" button

This is just the button, using the pencil icon. Wrap in a span or div tag if you want to move it around

Parameters

$right

at line 132
button($right = false)

Emit a properly styled "settings" button

This is just the button, using the pencil icon. Wrap in a span or div tag if you want to move it around

Parameters

$right

Emit a properly styled "settings" link

This is just the link, using the pencil icon and label.

Parameters

$right

at line 159
attr()

Return the attributes to add to a tag to connect to activate the settings modal

at line 165
start()

at line 193
end()

Finish the form output

at line 211
select($name, $default = false, $fields = false)

Handle a settings selector box

Parameters

$name
$default
$fields

at line 256
text($name, $title = false)

Handle a settings text box

Parameters

$name
$title

at line 284
color($name, $title = false)

Handle a settings color box

Parameters

$name
$title

at line 312
number($name, $title = false)

Handle a settings number box

Parameters

$name
$title

at line 340
textarea($name, $title = false)

Handle a settings textarea box

Parameters

$name
$title

at line 368
checkbox($name, $title = false)

Handle a settings checkbox

Parameters

$name
$title

at line 418
getDueDate()

Get the due data data in an object

at line 479
getDueDateDelta($time)

Show a due date delta in reasonable units

Parameters

$time

at line 496
dueDate()

Emit the text and form fields to support due dates

at line 552
done()

Emit the text and form fields to support the done option