Поддержка серверов

VOTE: методы, функции, константы класса Битрикс


Блог разработчика

9 августа 2016 ResizeImageGet и простой водяной знак налету

Сегодня поговорим о том как проще всего воткнуть водяной знак на картинки в Битрикс. Например, на все изображения каталога.

21 июля 2016 Добавление вкладки в CRM коробки Битрикс24

В этом посте я покажу, как легко и просто добавить вкладку в сущность CRM. И не просто добавить, а вывести там свой контент.

21 июля 2016 Как просто обращаться из коробки Битрикс24 на сайт на базе Битрикс

К примеру вам хочется внутренним скриптом дернуть с сайта-магазина информацию, которая там, в свою очередь, закрыта некоторыми правами. Например, админскими. Можно конечно мутить свой REST, или иной формат общения, но проще всего воспользоваться штатным инструментом:

События модуля vote

СобытиеВызывается
onBeforeVoteAddCVote::Add
onAfterVoteAddCVote::Add
onBeforeVoteUpdateCVote::Update
onAfterVoteUpdateCVote::Update
onBeforeVoteDeleteCVote::Delete
onAfterVoteDeleteCVote::Delete
onBeforeVoteAnswerAddCVoteAnswer::Add
onAfterVoteAnswerAddCVoteAnswer::Add
onBeforeVoteAnswerUpdateCVoteAnswer::Update
onAfterVoteAnswerUpdateCVoteAnswer::Update
onBeforeVoteAnswerDeleteCVoteAnswer::Delete
onAfterVoteAnswerDeleteCVoteAnswer::Delete
onBeforeVoteQuestionAddCVoteQuestion::Add
onAfterVoteQuestionAddCVoteQuestion::Add
onBeforeVoteQuestionUpdateCVoteQuestion::Update
onAfterVoteQuestionUpdateCVoteQuestion::Update
onBeforeVoteQuestionDeleteCVoteQuestion::Delete
onAfterVoteQuestionDeleteCVoteQuestion::Delete
onVoteQuestionActivateCVoteQuestion::setActive
onBeforeVoteChannelAddCVoteChannel::Add
onAfterVoteChannelAddCVoteChannel::Add
onBeforeVoteChannelUpdateCVoteChannel::Update
onAfterVoteChannelUpdateCVoteChannel::Update
onBeforeVoteChannelDeleteCVoteChannel::Delete
onAfterVoteChannelDeleteCVoteChannel::Delete
onBeforeVotingVote::voteFor
onAfterVotingVote::voteFor
onVoteResetresetStatistic

Константы модуля vote

КонстантаПроверяется
BX_COMP_MANAGED_CACHEController::getVoted
SITE_SERVER_NAMEVote::sendVotingMessage
PUBLIC_AJAX_MODEController::sendJsonResponse
VOTE_CACHE_TIMEChannel::getList

Список функций и методов модуля vote

Метод
GetAnswerTypeList()
GetVoteDiagramArray()
GetVoteDiagramList()
GetVoteDataByID($VOTE_ID, &$arChannel, &$arVote, &$arQuestions, &$arAnswers, &$arDropDown, &$arMultiSelect, &$arGroupAnswers, $arAddParams = "N")
GetCurrentVote($GROUP_SID, $site_id=SITE_ID, $access=1)
GetPrevVote($GROUP_SID, $level=1, $site_id=SITE_ID, $access=1)
GetVoteList($GROUP_SID = "", $params = array(), $site_id = SITE_ID)
IsUserVoted($voteId)
GetAnyAccessibleVote($site_id=SITE_ID, $channel_id=null)
GetTemplateList($type="SV", $path="xxx")
arrAnswersSort(&$arr, $order="desc")
ShowCurrentVote($GROUP_SID, $site_id=SITE_ID)
ShowPrevVoteResults($GROUP_SID, $level=1, $site_id=SITE_ID)
ShowCurrentVoteResults($GROUP_SID, $site_id=SITE_ID)
ShowVote($VOTE_ID, $template1="")
ShowVoteResults($VOTE_ID, $template1="")
fill_arc($start, $end, $color)
DecRGBColor($hex, &$dec1, &$dec2, &$dec3)
DecColor($hex)
HexColor($dec)
GetNextColor(&$color, &$current_color, $total, $start_color="0000CC", $end_color="FFFFCC")
VoteVoteEditFromArray($CHANNEL_ID, $VOTE_ID = false, $arFields = array(), $params = array())
CVote::err_mess()
CVote::GetFilterOperation($key)
CVote::CheckFields($ACTION, &$arFields, $ID = 0)
CVote::Add($arFields, $strUploadDir = false)
CVote::Update($ID, $arFields, $strUploadDir = false)
CVote::Delete($ID)
CVote::Reset($ID)
CVote::Copy($ID)
CVote::IsOldVersion()
CVote::GetByID($ID)
CVote::GetByIDEx($ID)
CVote::UserAlreadyVote($VOTE_ID, $VOTE_USER_ID, $UNIQUE_TYPE, $KEEP_IP_SEC, $USER_ID = false)
CVote::UserGroupPermission($CHANNEL_ID)
CVote::SetVoteUserID()
CVote::UpdateVoteUserID($VOTE_USER_ID)
CVote::keepVoting()
CVote::GetNextSort($CHANNEL_ID)
CVote::WrongDateInterval($CURRENT_VOTE_ID, $DATE_START, $DATE_END, $CHANNEL_ID)
_CVoteDBResult::_CVoteDBResult($res, $params = array())
_CVoteDBResult::Fetch()
CVoteNotifySchema::__construct()
CVoteNotifySchema::OnGetNotifySchema()
CVoteCacheManager::cachePath($site_id)
CVoteCacheManager::__construct()
CVoteCacheManager::SetTag($path, $tag, $ID = 0)
CVoteCacheManager::ClearTag($type, $ID=0)
CVoteCacheManager::OnAfterVoteChannelChange($ID, $arFields = array())
CVoteCacheManager::OnVoteChange(\Bitrix\Main\Entity\Event $event)
CVoteCacheManager::OnAfterVoteChange($ID)
CVoteCacheManager::OnAfterVoteQuestionAdd($ID, $arFields)
CVoteCacheManager::OnBeforeVoteQuestionUpdate(&$ID, &$arFields)
CVoteCacheManager::OnAfterVoteQuestionUpdate($ID, $arFields)
CVoteCacheManager::OnAfterVoteQuestionDelete($ID, $VOTE_ID)
CVoteCacheManager::OnAfterVoteAnswerAdd($ID, $arFields)
CVoteCacheManager::OnBeforeVoteAnswerUpdate($ID, $arFields)
CVoteCacheManager::OnAfterVoteAnswerUpdate($ID, $arFields)
CVoteCacheManager::OnAfterVoteAnswerDelete($ID, $QUESTION_ID, $VOTE_ID)
CVoteCacheManager::onAfterVoting($VOTE_ID, $EVENT_ID)
CVoteAnswer::err_mess()
CVoteAnswer::CheckFields($ACTION, &$arFields, $ID = 0)
CVoteAnswer::Add($arFields)
CVoteAnswer::Update($ID, $arFields)
CVoteAnswer::Delete($ID, $QUESTION_ID = false, $VOTE_ID = false)
CVoteAnswer::GetList($QUESTION_ID, $by="s_c_sort", $order="asc", $arFilter=array(), $arAddParams = array())
CVoteAnswer::GetListEx($arOrder = array("ID" => "ASC"), $arFilter=array())
CVoteAnswer::GetGroupAnswers($ANSWER_ID)
CVoteEvent::err_mess()
CVoteEvent::GetByID($ID)
CVoteEvent::GetAnswer($EVENT_ID, $ANSWER_ID)
CVoteEvent::Delete($eventId)
CVoteEvent::SetValid($eventId, $valid)
CVoteEvent::GetList(&$by, &$order, $arFilter=Array(), &$is_filtered, $get_user="N")
CVoteQuestion::err_mess()
CVoteQuestion::CheckFields($ACTION, &$arFields, $ID = 0)
CVoteQuestion::Add($arFields, $strUploadDir = false)
CVoteQuestion::Update($ID, $arFields, $strUploadDir = false)
CVoteQuestion::Copy($ID, $newVoteID)
CVoteQuestion::GetNextSort($VOTE_ID)
CVoteQuestion::GetByID($ID)
CVoteQuestion::GetList($VOTE_ID, &$by, &$order, $arFilter=Array(), &$is_filtered)
CVoteQuestion::GetListEx($arOrder = array("ID" => "ASC"), $arFilter=array())
CVoteQuestion::Delete($ID, $VOTE_ID = false)
CVoteQuestion::Reset($ID, $VOTE_ID = false)
CVoteQuestion::setActive($ID, $activate = true)
CVoteUser::err_mess()
CVoteUser::OnUserLogin()
CVoteUser::Delete($USER_ID)
CVoteUser::GetList(&$by, &$order, $arFilter=Array(), &$is_filtered)
CVoteChannel::err_mess()
CVoteChannel::CheckFields($ACTION, &$arFields, $ID = 0)
CVoteChannel::Add($arFields)
CVoteChannel::Update($ID, $arFields)
CVoteChannel::SetAccessPermissions($ID, $arGroups)
CVoteChannel::GetList(&$by, &$order, $arFilter=Array(), &$is_filtered)
CVoteChannel::GetSiteArray($CHANNEL_ID)
CVoteChannel::Delete($ID)
CVoteChannel::GetByID($ID)
CVoteChannel::GetArrayGroupPermission($channel_id)
CVoteChannel::GetGroupPermission($channel_id, $arGroups=false, $params = array())
CVoteDiagramType::CVoteDiagramType($directCall=true)
CVoteDiagramType::&getInstance()
VoteGetFilterOperation($key)
CVote::GetDropDownList()
CVote::GetActiveVoteID($CHANNEL_ID)
CVote::CheckVotingIP($VOTE_ID, $REMOTE_ADDR, $KEEP_IP_SEC, $params = array())
CVote::GetNextStartDate($CHANNEL_ID)
CVote::GetList(&$by, &$order, $arFilter=Array(), &$is_filtered)
CVote::GetListEx($arOrder = array(), $arFilter = array())
CVote::GetPublicList($arFilter=Array(), $strSqlOrder="ORDER BY C.C_SORT, C.ID, V.DATE_START desc", $params = array())
CVote::GetNowTime($ResultType = "timestamp")
CVoteEvent::GetUserAnswerStat($arSort = array(), $arFilter = array(), $arParams = array())
CVoteChannel::GetDropDownList()
DBResult::fetch()
VoteTable::getTableName()
VoteTable::getMap()
VoteTable::getList(array $parameters = array())
VoteTable::setCounter(array $id, $increment = true)
Vote::init()
Vote::getData($id)
Vote::checkData($voteId = 0, array &$data)
Vote::saveData($voteId, array $data)
Vote::sendVotingMessage(array $event, $vote, $type = "im")
Vote::getStatistic()
Vote::getChannel()
Vote::get($key)
Vote::getQuestions()
Vote::resume()
Vote::stop()
Vote::delete($id)
Vote::clearCache()
Vote::clearVotingCache()
Vote::exportExcel()
Vote::voteFor(array $request)
Vote::isVotedFor($userId)
Vote::canRead($userId)
Vote::canEdit($userId)
Vote::offsetExists($offset)
Vote::offsetGet($offset)
Vote::offsetSet($offset, $value)
Vote::offsetUnset($offset)
AnswerTable::getTableName()
AnswerTable::getMap()
AnswerTable::setCounter(array $id, $increment = true)
EventTable::getTableName()
EventTable::getMap()
EventQuestionTable::getTableName()
EventQuestionTable::getMap()
EventAnswerTable::getTableName()
EventAnswerTable::getMap()
Event::calculateStatistic($voteId)
resetStatistic($voteId)
deleteEvent($eventId)
setValid($eventId, $valid)
Connector::__construct($entityId)
Connector::buildFromAttachedObject(Attach $attachedObject)
Connector::className()
Connector::getDataToShow()
Connector::canRead($userId)
Connector::canEdit($userId)
Connector::checkFields(&$data)
Connector::getApplication()
Connector::getUser()
DefaultConnector::canRead($userId)
DefaultConnector::canEdit($userId)
DefaultConnector::setStorage(Channel $channel)
DefaultConnector::getStorage()
DefaultConnector::isStorable()
Controller::listActions()
Controller::init()
Controller::processActionVote()
Controller::processActionGetBallot()
Controller::processActionStop()
Controller::processActionResume()
Controller::getVoted(array $cacheParams, array $pageParams)
Controller::processActionGetVoted()
Controller::processActionGetMobileVoted()
Controller::processActionExportXls()
Controller::clearCache($voteId)
Attach::__construct(array $attach, $vote = null)
Attach::init()
Attach::getErrors()
Attach::getErrorByCode($code)
Attach::canRead($userId)
Attach::canParticipate($userId)
Attach::canEdit($userId)
Attach::getConnector()
Attach::getStorage()
Attach::getAttachId()
Attach::getVoteId()
Attach::getModuleId()
Attach::getEntityType()
Attach::getEntityId()
Attach::getStatistic()
Attach::delete()
Attach::checkData(array &$data)
Attach::save($data, $createdBy = 0)
Attach::voteFor(array $request)
Attach::exportExcel()
Attach::isVotedFor($userId)
Attach::resume()
Attach::stop()
Attach::loadFromAttachId($id)
Attach::loadFromVoteId(array $attach, $id)
Attach::loadEmptyAttach(array $attach, array $voteParams)
Attach::loadFromEntity(array $filter)
Attach::detachByFilter(array $filter)
Attach::offsetExists($offset)
Attach::offsetGet($offset)
Attach::offsetSet($offset, $value)
Attach::offsetUnset($offset)
ForumMessageConnector::canRead($userId)
ForumMessageConnector::canEdit($userId)
BlogPostConnector::getPostData($entityId)
BlogPostConnector::getPermission($userId)
BlogPostConnector::checkFields(&$data)
BlogPostConnector::canRead($userId)
BlogPostConnector::canEdit($userId)
BaseObject::__construct($id)
BaseObject::init()
BaseObject::getId()
BaseObject::getErrors()
BaseObject::getErrorByCode($code)
BaseObject::canRead($userId)
BaseObject::canEdit($userId)
BaseObject::getUser()
BaseObject::getApplication()
BaseObject::loadUserGroups($userId)
BaseObject::loadFromId($id)
Diag::__construct()
Diag::getInstance()
Diag::setShowOnDisplay($showOnDisplay)
Diag::setExclusiveUserId($exclusiveUserId)
Diag::activate()
Diag::deactivate()
Diag::collectDebugInfo($uniqueId)
Diag::getDebugInfoSql()
Diag::logDebugInfo($uniqueId, $label = null)
Diag::log($data)
Diag::reformatBackTrace(array $backtrace)
Diag::getUser()
Controller::__construct()
Controller::end()
Controller::exec()
Controller::collectDebugInfo()
Controller::logDebugInfo()
Controller::getUser()
Controller::sendJsonResponse($response, $params = null)
Controller::sendJsonErrorResponse()
Controller::sendJsonAccessDeniedResponse($message = '')
Controller::sendJsonSuccessResponse(array $response = array())
Controller::sendResponse($response)
Controller::getErrors()
Controller::getErrorByCode($code)
Controller::resolveAction()
Controller::sanitizeActionName($actionName)
Controller::normalizeActionDescription($action, $description)
Controller::checkAction()
Controller::getAction()
Controller::getActionDescription()
Controller::setAction($action, array $description)
Controller::setActionName($action)
Controller::prepareParams()
Controller::processBeforeAction($actionName)
Controller::runAction()
Controller::getApplication()
Controller::checkRequiredInputParams(array $inputParams, array $required)
Controller::checkRequiredPostParams(array $required)
Controller::checkRequiredGetParams(array $required)
Controller::checkRequiredFilesParams(array $required)
Controller::isAjaxRequest()
QuestionTable::getTableName()
QuestionTable::getMap()
QuestionTable::setCounter(array $id, $increment = true)
UserTable::getTableName()
UserTable::getMap()
UserTable::setCounter(array $id, $increment = true)
VoteEventQuestionTable::getTableName()
VoteEventQuestionTable::getMap()
VoteEventAnswer::getTableName()
VoteEventAnswer::getMap()
User::__construct($id)
User::init()
User::getVotedUserId()
User::setVotedUserId($incrementCount = null)
User::isVotedFor($voteId)
User::isUserVotedFor($voteId, $userId)
User::getCurrent()
Manager::__construct(array $params)
Manager::getInstance(array $params)
Manager::loadFromAttachId($id)
Manager::loadFromVoteId($id)
Manager::loadEmptyObject()
Manager::loadFromEntity()
Manager::belongsToEntity(Attach $attachedObject, $entityType, $entityId)
Manager::getConnectorDataByEntityType($entityType)
Manager::getConnectors()
Manager::getDefaultConnectors()
Manager::getAdditionalConnectors()
Manager::getAdditionalConnector($entityType)
Manager::buildAdditionalConnectorList()
Manager::showEdit(&$params, &$result, $component = null)
Manager::showView(&$params, &$result, $component = null)
Manager::getErrors()
VoteUserType::getUserTypeDescription()
VoteUserType::getDBColumnType($userField)
VoteUserType::onBeforePostUserFieldUpdate($entityId, $ID, $fields)
VoteUserType::prepareSettings($userField)
VoteUserType::checkSettings(&$params)
VoteUserType::getSettingsHTML($userField = false, $htmlControl, $varsFromForm)
VoteUserType::getEditFormHTML($userField)
VoteUserType::getPublicViewHTML($userField, $value)
VoteUserType::getFilterHTML()
VoteUserType::getAdminListViewHTML($userField, $htmlControl)
VoteUserType::getAdminListEditHTML($userField, $htmlControl)
VoteUserType::getAdminListEditHTMLMulty($userField, $htmlControl)
VoteUserType::checkFields($userField, $value, $userId = false)
VoteUserType::onSearchIndex($userField)
VoteUserType::onBeforeSave($userField, $value, $userId = false)
VoteUserType::onDelete($userField, $value)
VoteUserType::detectType($value)
AttachTable::getTableName()
AttachTable::getMap()
AttachTable::getList(array $parameters = array())
AttachTable::deleteByFilter(array $filter)
Attach::getData($id)
Attach::getDataByEntity(array $id)
ChannelTable::getTableName()
ChannelTable::getMap()
ChannelGroupTable::getTableName()
ChannelGroupTable::getMap()
ChannelSiteTable::getTableName()
ChannelSiteTable::getMap()
Channel::init()
Channel::getList(array $parameters)
Channel::getById($id)
Channel::canRead($userId)
Channel::canEdit($userId)
Channel::canEditVote($userId)
Channel::get($key)
Channel::offsetExists($offset)
Channel::offsetGet($offset)
Channel::offsetSet($offset, $value)
Channel::offsetUnset($offset)
vote::vote()
vote::InstallUserFields($moduleId = "all")
vote::UnInstallUserFields()
vote::InstallDB($arParams = array())
vote::UnInstallDB($arParams = array())
vote::InstallEvents()
vote::UnInstallEvents()
vote::InstallFiles($arParams = array())
vote::UnInstallFiles()
vote::DoInstall()
vote::DoUninstall()