\StickyNotes
Administator reminders and notes implementation
Synopsis
class StickyNotes
{
- // constants
- const CACHE_TIMEOUT = 3600;
- const CACHE_KEY_NOTES = 'STICKYNOTES';
- const CACHE_KEY_REVELATIONS = 'STICKYREVELATIONS';
- const URL_ME = '?module=stickynotes';
- const URL_REVELATIONS = '?module=stickynotes&revelations=true';
- const PREVIEW_LEN = 190;
- const ROUTE_CALENDAR = 'calendarview';
- const ROUTE_BACK = 'backurl';
- const ROUTE_SHOW_NOTE = 'shownote';
- const ROUTE_EDIT_FORM = 'editform';
- const ROUTE_DEL_NOTE = 'delete';
- const PROUTE_NEW_NOTE = 'newtext';
- const PROUTE_EDIT_NOTE_TEXT = 'edittext';
- const PROUTE_EDIT_NOTE_ID = 'editnoteid';
- const PROUTE_NEW_REVELATION = 'newrevelationtext';
- const ROUTE_DEL_REV = 'deleterev';
- const PROUTE_EDIT_REV_TEXT = 'editrevelationtext';
- const PROUTE_EDIT_REV_ID = 'editrevelationid';
- const ROUTE_EDIT_REV_FORM = 'editrev';
- const ROUTE_REVELATIONS = 'revelations';
- const PROUTE_REMIND_DATE = 'reminddate';
- const PROUTE_REMIND_TIME = 'remindtime';
- // members
- protected array $allnotes = ;
- protected array $allRevelations = ;
- protected bool $revelationsFlag = false;
- protected array $activenotes = ;
- protected string $myLogin = '';
- protected $cache = '';
- protected bool $notesPreview = true;
- // methods
- public void __construct()
- protected void loadConfig()
- protected void setLogin()
- protected void initCache()
- protected void flushCache()
- protected void loadAllNotes()
- protected void loadActiveNotes()
- protected void loadRevelations()
- public array getNoteData()
- protected array getRevelationData()
- protected string cutString()
- public string renderListGrid()
- public string renderListCalendar()
- public string renderRevelationsList()
- protected void createNote()
- protected void createRevelation()
- protected string renderStickyNote()
- public string panel()
- protected string createForm()
- protected string revelationCreateForm()
- public string revelationEditForm()
- public void saveMyRevelation()
- public void addMyRevelation()
- public string editForm()
- public string getEditFormDeleteControls()
- public void addMyNote()
- public void saveMyNote()
- public void deleteNote()
- public void deleteRevelation()
- public string renderNote()
- protected string makeFullNoteLink()
- public string renderTaskbarNotify()
Constants
Name | Value |
---|---|
CACHE_TIMEOUT | 3600 |
CACHE_KEY_NOTES | 'STICKYNOTES' |
CACHE_KEY_REVELATIONS | 'STICKYREVELATIONS' |
URL_ME | '?module=stickynotes' |
URL_REVELATIONS | '?module=stickynotes&revelations=true' |
PREVIEW_LEN | 190 |
ROUTE_CALENDAR | 'calendarview' |
ROUTE_BACK | 'backurl' |
ROUTE_SHOW_NOTE | 'shownote' |
ROUTE_EDIT_FORM | 'editform' |
ROUTE_DEL_NOTE | 'delete' |
PROUTE_NEW_NOTE | 'newtext' |
PROUTE_EDIT_NOTE_TEXT | 'edittext' |
PROUTE_EDIT_NOTE_ID | 'editnoteid' |
PROUTE_NEW_REVELATION | 'newrevelationtext' |
ROUTE_DEL_REV | 'deleterev' |
PROUTE_EDIT_REV_TEXT | 'editrevelationtext' |
PROUTE_EDIT_REV_ID | 'editrevelationid' |
ROUTE_EDIT_REV_FORM | 'editrev' |
ROUTE_REVELATIONS | 'revelations' |
PROUTE_REMIND_DATE | 'reminddate' |
PROUTE_REMIND_TIME | 'remindtime' |
Members
protected
- $activenotes
—
array
Contains active user notes which may require notification - $allRevelations
—
array
Contains all available revelations - $allnotes
—
array
Contains available user notes - $cache
—
System caching object placeholder - $myLogin
—
string
Contains current instance user login - $notesPreview
—
bool
Just a flag of preview functionality in notes grid list - $revelationsFlag
—
bool
Is revelations enabled?
Methods
protected
- createForm() — Returns note create form
- createNote() — Creates new note in database
- createRevelation() — Creates new sticky revelation in database
- cutString() — Returns cutted string if needed
- flushCache() — Flushes cache keys on sticky notes or revelations changes
- getRevelationData() — Returns revelation data
- initCache() — Inits system caching object instance
- loadActiveNotes() — Loads active/remind notes from database into private property
- loadAllNotes() — Loads notes from database into private property
- loadConfig() — Loads required options
- loadRevelations() — Loads all revelations from database
- makeFullNoteLink() — Returns note text with link to full note view if required
- renderStickyNote() — Renders notify container with some text inside
- revelationCreateForm() — Returns revelation creation form
- setLogin() — Sets current instance user login into protected property
public
- __construct() — Creates new sticky notes instance
- addMyNote() — Creates new personal note in database
- addMyRevelation() — Creates new revelation in database
- deleteNote() — Deletes some note by its ID
- deleteRevelation() — Deletes some revelation by its ID
- editForm() — Returns edit form for some sticky note
- getEditFormDeleteControls() — Returns sticky note deletion dialog to render below of editing form
- getNoteData() — Returns note data extracted from private allnotes property
- panel() — Returns control panel
- renderListCalendar() — Returns available sticky notes list as full calendar
- renderListGrid() — Returns list of available sticky notes with it controls as grid
- renderNote() — Returns full text of sticky note with check of owner
- renderRevelationsList() — Renders existing revelations list with some controls
- renderTaskbarNotify() — Returns available taskbar notifications as floating widget
- revelationEditForm() — Returns revelation editing form
- saveMyNote() — Saves changes of note in database
- saveMyRevelation() — Saves changes of revelation in database