1C-Bitrix 25.700.0
Загрузка...
Поиск...
Не найдено
Класс Vote
Граф наследования:Vote:
BaseObject

Открытые члены

 __construct ($id)
 init ()
 sendVotingMessage (array $event, $vote, $type="im")
 fillStatistic ()
 getStatistic ()
 getChannel ()
 get ($key)
 getQuestion (int $id)
 getQuestions ()
 resume ()
 stop ()
 clearCache ()
 exportExcel ($type="html")
 voteFor (array $request, $params=[])
 canRead ($userId)
 canEdit ($userId)
 canParticipate ($userId)
 canRevote ($user)
 canReadResult ($user)
 offsetExists ($offset)
 offsetGet ($offset)
 offsetSet ($offset, $value)
 offsetUnset ($offset)
 recall (int $userId)
Открытые члены унаследованные от BaseObject
 getId ()
 getErrors ()
 getErrorByCode ($code)
 getUser ()
 getApplication ()

Открытые статические члены

static checkData (array &$data, $voteId=0)
static saveData ($voteId, array $data)
static delete ($id)
Открытые статические члены унаследованные от BaseObject
static loadUserGroups ($userId)
static loadFromId ($id, $shouldBeNewIfIdIsNull=false)
static shutdown ()

Статические открытые данные

static $storage = array()
static $statStorage = array()

Защищенные данные

 $vote = array()
 $questions = array()
 $channel = null
Защищенные данные унаследованные от BaseObject
 $id
 $errorCollection

Статические защищенные данные

static $canVoteStorage = []
Статические защищенные данные унаследованные от BaseObject
static $userGroups = []
static $objectStorage = []

Подробное описание

См. определение в файле vote.php строка 454

Конструктор(ы)

◆ __construct()

__construct ( $id)

Переопределяет метод предка BaseObject.

См. определение в файле vote.php строка 464

Методы

◆ canEdit()

canEdit ( $userId)

Checks rights to update current attached object.

Аргументы
int$userIdId of user.
Возвращает
bool

Переопределяет метод предка BaseObject.

См. определение в файле vote.php строка 1624

◆ canParticipate()

canParticipate ( $userId)

См. определение в файле vote.php строка 1653

◆ canRead()

canRead ( $userId)

Checks rights to read current attached object.

Аргументы
int$userIdId of user.
Возвращает
bool

Переопределяет метод предка BaseObject.

См. определение в файле vote.php строка 1590

◆ canReadResult()

canReadResult ( $user)

См. определение в файле vote.php строка 1803

◆ canRevote()

canRevote ( $user)

См. определение в файле vote.php строка 1787

◆ checkData()

checkData ( array & $data,
$voteId = 0 )
static
Аргументы
int$voteIdVote ID.
array&$dataArray( "CHANNEL_ID" => 5, "AUTHOR_ID" => 1, "DATE_START" => ..., "DATE_END" => ..., "TITLE" => "ABC...", "ACTIVE" => "Y", "URL" => "http://", "NOTIFY" => "Y" || "N" || "I", "UNIQUE_TYPE" => security context, "DELAY" => 150, //seconds "QUESTIONS" => array( 1 => array( "ID" => 0, "QUESTION" => "Question text", "QUESTION_TYPE" => "text"||"html", "ANSWERS" => array( array( "ID" => 0, "MESSAGE" => "Answer text", "MESSAGE_TYPE" => "text"||"html", "FIELD_TYPE" => 0||1||2||3||4|| ) ) ) );.
Возвращает
bool
Исключения
ArgumentException

См. определение в файле vote.php строка 643

◆ clearCache()

clearCache ( )

Clears cache

Возвращает
void

См. определение в файле vote.php строка 1158

◆ delete()

delete ( $id)
static

Deletes Vote by its id.

Аргументы
integer$idVote ID.
Возвращает
bool

См. определение в файле vote.php строка 1148

◆ exportExcel()

exportExcel ( $type = "html")

Exports data of voting into excel file

Аргументы
string$typehtml|xls|csv
Возвращает
void

См. определение в файле vote.php строка 1181

◆ fillStatistic()

fillStatistic ( )

Complete vote array by data from DB.

Возвращает
void

См. определение в файле vote.php строка 967

◆ get()

get ( $key)
Аргументы
string$keyThe name if characteristic that you want to know.
Возвращает
mixed

См. определение в файле vote.php строка 1099

◆ getChannel()

getChannel ( )
Возвращает
array|null

См. определение в файле vote.php строка 1077

◆ getQuestion()

getQuestion ( int $id)

Returns question array.

Аргументы
int$id
Возвращает
array|null

См. определение в файле vote.php строка 1109

◆ getQuestions()

getQuestions ( )
Возвращает
array

См. определение в файле vote.php строка 1118

◆ getStatistic()

getStatistic ( )

См. определение в файле vote.php строка 1021

◆ init()

init ( )

exists only for child class

Возвращает
void

Переопределяет метод предка BaseObject.

См. определение в файле vote.php строка 471

◆ offsetExists()

offsetExists ( $offset)
Аргументы
string$offsetKey for vote or attach data array.
Возвращает
bool

См. определение в файле vote.php строка 1832

◆ offsetGet()

offsetGet ( $offset)
Аргументы
string$offsetKey for vote or attach data array.
Возвращает
array|mixed|null

См. определение в файле vote.php строка 1842

◆ offsetSet()

offsetSet ( $offset,
$value )

Is not supported.

Аргументы
string$offsetKey for vote or attach data array.
mixed$valueValue for vote or attach data array.
Возвращает
void
Исключения

Bitrix\Main\NotSupportedException

См. определение в файле vote.php строка 1857

◆ offsetUnset()

offsetUnset ( $offset)

Is not supported.

Аргументы
string$offsetKey for vote or attach data array.
Возвращает
void
Исключения

Bitrix\Main\NotSupportedException

См. определение в файле vote.php строка 1867

◆ recall()

recall ( int $userId)

См. определение в файле vote.php строка 1872

◆ resume()

resume ( )

Prolongs the time of voting for a year

Возвращает
void

См. определение в файле vote.php строка 1127

◆ saveData()

saveData ( $voteId,
array $data )
static
Аргументы
integer$voteIdVote ID, can be 0.
array$dataLook at checkData.
Возвращает
int
Исключения
ArgumentException

См. определение в файле vote.php строка 737

◆ sendVotingMessage()

sendVotingMessage ( array $event,
$vote,
$type = "im" )

Sends notifications to users.

Аргументы
array$eventArray("ID" => 1, "VOTE_USER_ID" => 45);.
array$voteArray(ID => 1, QUESTIONS => array("ID" => 2, ANSWERS => array()));.
string$typeCan be "im" || "mail".
Возвращает
bool

См. определение в файле vote.php строка 835

◆ stop()

stop ( )

Sets the finish time for voting by current moment

Возвращает
void

См. определение в файле vote.php строка 1137

◆ voteFor()

voteFor ( array $request,
$params = [] )

Voting for vote from current user $USER.

Аргументы
array$requestOld variant Array(" vote_checkbox_".$questionId => array(1,2,3,...), "vote_multiselect_".$questionId => array(1,2,3,...), "vote_dropdown_".$questionId => 12 || "12", "vote_radio_".$questionId => 12 || "12", "vote_field_".$answerId => "12"). New variant is [ EXTRA => [HIDDEN => N], 871 => [345 => (Does not matter || text from field)], QUESTION_ID => [ANSWER_ID => (Y || text from field)], ]
array$params
Возвращает
bool
Исключения
AccessDeniedException

См. определение в файле vote.php строка 1434

Поля

◆ $canVoteStorage

$canVoteStorage = []
staticprotected

См. определение в файле vote.php строка 460

◆ $channel

$channel = null
protected

См. определение в файле vote.php строка 458

◆ $questions

$questions = array()
protected

См. определение в файле vote.php строка 457

◆ $statStorage

$statStorage = array()
static

См. определение в файле vote.php строка 462

◆ $storage

$storage = array()
static

См. определение в файле vote.php строка 461

◆ $vote

$vote = array()
protected

См. определение в файле vote.php строка 456


Объявления и описания членов класса находятся в файле: