YaWK
24.1
Yet another WebKit
|
Backend class serves a few useful functions for the admin backend. More...
Static Public Member Functions | |
static | drawContentWrapper () |
Draw the AdminLTE Content Wrapper. Useful that view dont crash in situations where the DOM is not loaded or could not be loaded. More... | |
static | drawFontList ($fontArray, $folder, $type, $lang) |
Draw a list with all fonts. Expects fonts as array. More... | |
static | drawLoginBox ($db, $lang) |
Draw a login box. Basically it wraps the drawLoginForm function with an AdminLTE box. More... | |
static | drawLoginForm ($username, $password, $lang) |
Draw a login form. If username and/or password was given, the form will be pre-filled with given values. More... | |
static | drawTemplateSelectField ($db, $description) |
Draw a SELECT field with all templates, current active template is selected. More... | |
static | drawWidgetsOnPageBox ($db, $page, $lang) |
Draw a box containing all widgets that are linked with given page. Every Widget gets drawn as small bubble/button and is linked with the corresponding Widget-edit page. This increased the workflow while editing a page and their widgets. More... | |
static | getFullUsername ($user) |
Clever function to return the username. Expects the user object as param to work correctly. More... | |
static | getFX ($db, $time, $type) |
Include Javascript FX to apply on #content-FX DOM element. More... | |
static | getMenuNamesArray ($db) |
return all menu ids and names as array More... | |
static | getMenusArray ($db) |
Get Menu id name and published into an array. More... | |
static | getPagesArray ($db) |
Get pages and user groups into an array. More... | |
static | getSettingsBreadcrumbs ($lang) |
Return breadcrumbs for settings pages. More... | |
static | getTemplateBreadcrumbs ($lang) |
Return breadcrumbs for template pages. More... | |
static | getTitle ($title, $subtext) |
Header title on top of every page. More... | |
static | printTooltip ($toolTipText) |
Draw a small question mark, enabling a tooltip on hover. toolTipText must be a string and will usually come from any language file. More... | |
static | setFocus ($field) |
Set focus to any input field on pageload. More... | |
static | setTimeout ($location, $wait) |
Backend class serves a few useful functions for the admin backend.
backend Interface Helper Functions
This class serves a few useful functions for the admin backend.
<?php YAWK\backend::getTitle("title", "subtext"); ?>
Brings up the title on every page in admin panel.
<?php YAWK\backend::setTimeout("index.php?pages=dashboard", "200"); ?>
Set a javascript redirection url and $wait time in ms before redirecting
<?php YAWK\backend::setFocus("$field"); ?>
Set focus to any form input field on document ready.
More backend helper functions may come in future releases.
Class covers backend functionality. See Methods Summary for Details!
Definition at line 26 of file backend.php.
|
static |
Draw the AdminLTE Content Wrapper. Useful that view dont crash in situations where the DOM is not loaded or could not be loaded.
Definition at line 144 of file backend.php.
|
static |
Draw a list with all fonts. Expects fonts as array.
array | $fontArray | array with font names |
string | $folder | the folder where fonts are stored |
array | $lang | language array |
Definition at line 488 of file backend.php.
References $folder, $fontArray, $lang, and $type.
|
static |
Draw a login box. Basically it wraps the drawLoginForm function with an AdminLTE box.
object | $db | Database object |
string | $title | Box title |
string | $username | The username |
string | $password | The password |
draw login box
Definition at line 294 of file backend.php.
References $db, $ip, $lang, YAWK\backend\drawLoginForm(), YAWK\settings\getSetting(), and YAWK\backend\setFocus().
|
static |
Draw a login form. If username and/or password was given, the form will be pre-filled with given values.
string | $username | The username |
string | $password | The password |
draw login box
Definition at line 243 of file backend.php.
References $_GET, $lang, $password, $redirect, and $username.
Referenced by YAWK\backend\drawLoginBox().
|
static |
Draw a SELECT field with all templates, current active template is selected.
object | $db | Database object |
Definition at line 213 of file backend.php.
References $db, and YAWK\template\getTemplateIds().
Referenced by YAWK\settings\getFormElements().
|
static |
Draw a box containing all widgets that are linked with given page. Every Widget gets drawn as small bubble/button and is linked with the corresponding Widget-edit page. This increased the workflow while editing a page and their widgets.
object | $db | Database handle |
object | $page | current page object |
array | $lang | language array |
Definition at line 550 of file backend.php.
References $db, $lang, $page, and YAWK\widget\loadWidgetsOfPage().
|
static |
Clever function to return the username. Expects the user object as param to work correctly.
object | $user | User object is required. |
Definition at line 377 of file backend.php.
Referenced by YAWK\BACKEND\AdminLTE\drawHtmlLeftSidebar(), and YAWK\BACKEND\AdminLTE\drawHtmlNavbarUserAccountMenu().
|
static |
Include Javascript FX to apply on #content-FX DOM element.
object | $db | Database object |
string | $time | FX time in milliseconds |
string | $type | FX type |
Definition at line 123 of file backend.php.
References $db, $type, and YAWK\settings\getSetting().
Referenced by YAWK\BACKEND\AdminLTE\drawHtmlEnd().
|
static |
return all menu ids and names as array
$db |
Definition at line 465 of file backend.php.
References $db, $res, $rows, and die.
Referenced by YAWK\settings\getFormElements().
|
static |
Get Menu id name and published into an array.
object | $db | Database object |
Definition at line 440 of file backend.php.
|
static |
Get pages and user groups into an array.
object | $db | Database object |
Definition at line 415 of file backend.php.
|
static |
Return breadcrumbs for settings pages.
array | $lang | Language Array |
Definition at line 34 of file backend.php.
|
static |
Return breadcrumbs for template pages.
array | $lang | Language Array |
Definition at line 55 of file backend.php.
|
static |
Header title on top of every page.
string | $title | Title to display |
string | $subtext | Subtitle as small-tag beneath Title |
Definition at line 79 of file backend.php.
References $subtext.
|
static |
Draw a small question mark, enabling a tooltip on hover. toolTipText must be a string and will usually come from any language file.
string | $toolTipText | text that will appear as tooltip on mouseover |
Definition at line 603 of file backend.php.
Referenced by YAWK\menu\displayEditable(), and YAWK\BACKEND\dashboard\drawLatestPagesBox().
|
static |
Set focus to any input field on pageload.
string | $field | Name of the html input form element who should be focused. |
Definition at line 93 of file backend.php.
References $field.
Referenced by YAWK\backend\drawLoginBox().
|
static |
Do a javascript redirect to $location after given delay time ($wait) in ms
string | $location | url to redirect |
string | $wait | Time to wait in ms before redirect |
Definition at line 106 of file backend.php.