\PollsExport
User polls exporting class
Synopsis
class PollsExport
extends PollsReport
{
- // constants
- const EXPORT_PID = 'BTRX42_POLLS';
- // Inherited constants from PollsReport
- const URL_REPORT = '?module=report_polls';
- // members
- protected array $altCfg = ;
- protected array $allPollsVotesRaw = ;
- protected array $allPollsVotesProcessed = ;
- protected string $exportUrl = '';
- protected string $exportVar = '';
- protected $apiCrm = '';
- // Inherited members from PollsReport
- protected array $alladdress;
- // Inherited members from Polls
- protected string $myLogin;
- protected string $poll_id;
- protected array $adminsName;
- protected array $pollsAvaible;
- protected array $pollsOptions;
- protected array $pollsOptionsCount;
- protected array $pollsVotes;
- protected array $pollsVotesCount;
- protected array $pollsOptionVotesCount;
- protected void $pollJavaScript;
- protected void $pollCss;
- protected integer $cacheTime;
- // methods
- public void __construct()
- protected void loadConfig()
- protected void loadAllPollsVotes()
- protected void preprocessAllPollsVotes()
- public array getAllPollsVotes()
- protected void initApiCrm()
- protected void pushCrmData()
- public void runExport()
- // Inherited methods from PollsReport
- public void __construct()
- protected void getFulladdress()
- protected string getNumberAllUsers()
- protected void draw3DPie()
- protected string renderPollsSearchForm()
- protected string searchPollsOptions()
- public void panel()
- public string renderPollsSearchVotes()
- public string renderOptionVotes()
- public string renderAvaibleVotes()
- public void ajaxAvaibleVotes()
- public string renderPollVotes()
- public void ajaxPollVotes()
- // Inherited methods from Polls
- public void __construct()
- protected string loadPollJavaScript()
- protected string loadPollCss()
- protected void initMessages()
- protected void setLogin()
- protected void initCache()
- protected void setPollId()
- protected void loadAdminsName()
- protected void initAdminName()
- protected array loadAvaiblePollsCached()
- public array loadAvaiblePolls()
- protected array loadPollsOptionsCached()
- public array loadPollsOptions()
- protected void pollsVotesCacheInfoClean()
- protected array loadPollsVotesCached()
- public array loadPollsVotes()
- protected void createPoll()
- protected void editPoll()
- protected void deletePoll()
- protected void deletePollOptions()
- protected void deletePollVotes()
- protected void editPollConfigs()
- protected void renderPollStatus()
- protected string renderPollData()
- public string renderFormPoll()
- public string renderPreviewPollOption()
- public void controlPoll()
- public void controlPollOptions()
- public string renderFormPollOption()
- public void panel()
- public void deletePollData()
- public string renderAvaiblePolls()
- public void ajaxAvaiblePolls()
Hierarchy
Extends
Constants
Name | Value |
---|---|
EXPORT_PID | 'BTRX42_POLLS' |
URL_REPORT | '?module=report_polls' |
URL_ME | '?module=polls' |
Members
protected
- $adminsName
—
array
Contains admns Name as admin_login => admin_name - $allPollsVotesProcessed
—
array
Contains preprocessed votes data for each poll as: pollId=>[login=>login/date/option_id] - $allPollsVotesRaw
—
array
Contains raw votes data - $alladdress
—
array
returns all addres - $altCfg
—
array
Contains system alter config as key=>value - $apiCrm
—
Export URL HTTP abstraction placeholder - $cacheTime
—
int
Polls caching time - $exportUrl
—
string
Contains current instance URL to push some data - $exportVar
—
string
Name of POST variable to export updated users data - $myLogin
—
string
Contains current user login - $pollCss
—
void
Contains STYLE design for form - $pollJavaScript
—
void
Contains java scipt for dynamic add and remove input form field - $poll_id
—
string
Contains Poll ID from $_GET - $pollsAvaible
—
array
Contains all polls as id => array (title, enabled, start_date, end_date, params, admin, voting) - $pollsOptionVotesCount
—
array
Contains votes count by options as option_id => count - $pollsOptions
—
array
Contains all polls options as poll_id => array (id => [text]) - $pollsOptionsCount
—
array
Contains poll options count as poll_id => count - $pollsVotes
—
array
Contains all polls votes as [poll_id] => Array ( parametr => Array ( [login] => $value)) - $pollsVotesCount
—
array
Contains poll votes count as poll_id => count
Methods
protected
- initApiCrm() — Inits CRM HTTP abstraction layer
- loadAllPollsVotes() — Preloads raw voting data
- loadConfig() — Preloads some required configs for further usage
- preprocessAllPollsVotes() — Performs preprocessing of users votes data
- pushCrmData() — Pushes polls user votes struct into CRM hook
public
- __construct() — Там, де річка, наче стрічка В`ється через балку
- getAllPollsVotes() — Returns all existing polls votes
- runExport() — Just pushes all votes and polls data onto CRM hook
Inherited from PollsReport
protected
- draw3DPie() — Draw 3DPie about poll votes
- getFulladdress() — Loads full address list from cache
- getNumberAllUsers() — Loads the number of all users
- renderPollsSearchForm() — Returns polls search form
- searchPollsOptions() — Loads the number of all users
public
- ajaxAvaibleVotes() — Renders json formatted data about Polls
- ajaxPollVotes() — Renders json formatted data about Polls votes
- panel() — Renders polls module control panel
- renderAvaibleVotes() — Renders polls module control panel interface
- renderOptionVotes() — Renders polls module control panel interface
- renderPollVotes() — Renders polls votes control panel
- renderPollsSearchVotes() — Renders polls module control panel interface
Inherited from Polls
protected
- createPoll() — Create poll on database
- deletePoll() — Delete poll from database
- deletePollOptions() — Delete polls options from database
- deletePollVotes() — Delete polls votes from database
- editPoll() — Change poll data on database
- editPollConfigs() — Change poll options on database
- initAdminName() — Init admin Name
- initCache() — Initalizes system cache object
- initMessages() — Inits system messages helper object for further usage
- loadAdminsName() — Loads admis Name
- loadAvaiblePollsCached() — Loads All avaible Polls from cache
- loadPollCss() — Load style for form
- loadPollJavaScript()
- loadPollsOptionsCached() — Loads all avaible polls options from cache
- loadPollsVotesCached() — Loads all avaible votes result from cache
- pollsVotesCacheInfoClean() — Check for last cache data and if need clean
- renderPollData() — Renders Poll data
- renderPollStatus() — Render poll status
- setLogin() — Sets current user login
- setPollId() — Initalizes $poll_id
public
- ajaxAvaiblePolls() — Renders json formatted data about Polls
- controlPoll() — Poll control function
- controlPollOptions() — Poll options control
- deletePollData() — Deletes all data about poll from database by ID
- loadAvaiblePolls() — Loads All avaible Polls from databases
- loadPollsOptions() — Loads all avaible polls options from databases
- loadPollsVotes() — Loads all avaible votes result from databases
- panel() — Renders polls module control panel
- renderAvaiblePolls() — Renders polls module control panel interface
- renderFormPoll() — Renders Poll config container
- renderFormPollOption() — Renders Polls options from container
- renderPreviewPollOption() — Renders Poll options preview container