1C-Bitrix 25.700.0
Класс Attach
Граф наследования:Attach:
BaseObject

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

 init ()
 setVote ($vote)
 setStorage ($id)
 canRead ($userId)
 canParticipate ($userId)
 canVote ($userId)
 canRevote ($userId)
 canReadResult ($userId)
 canEdit ($userId)
 getConnector ()
 getStorage ()
 getAttachId ()
 getVoteId ()
 getModuleId ()
 getEntityType ()
 getEntityId ()
 fillStatistic ()
 delete ()
 checkData (array &$data)
 save ($data, $createdBy=0)
 voteFor (array $request, string $actionUuid='')
 exportExcel ()
 isVotedFor ($userId)
 resume (string $actionUuid='')
 stop (string $actionUuid='')
 offsetExists ($offset)
 offsetGet ($offset)
 offsetSet ($offset, $value)
 offsetUnset ($offset)
 getUserEventsAnswersStatByUserId (int $userId)
 getUserEventAnswers (int $eventId)
 recall (int $userId, string $actionUuid='')
 isFinished ()
 isPublicVote ()
Открытые члены унаследованные от BaseObject
 __construct ($id)
 getId ()
 getErrors ()
 getErrorByCode ($code)
 getUser ()
 getApplication ()

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

static getData ($id)
static getDataByEntity (array $id)
static loadFromId ($id, $shouldBeNewIfIdIsNull=false)
static generateUid ()
Открытые статические члены унаследованные от BaseObject
static loadUserGroups ($userId)
static shutdown ()

Поля данных

const UID_LENGTH = 16

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

static $storage = array()

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

 $attach
 $vote
 $connector
 $channel
Защищенные данные унаследованные от BaseObject
 $id
 $errorCollection

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

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

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

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

Методы

◆ canEdit()

canEdit ( $userId)

Checks rights to update current attached object.

Аргументы
int$userIdId of user.
Возвращает
bool
Исключения
SystemException

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

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

◆ canParticipate()

canParticipate ( $userId)

Checks rights for voting.

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

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

◆ canRead()

canRead ( $userId)

Checks rights to read current attached object.

Аргументы
int$userIdId of user.
Возвращает
bool
Исключения
SystemException

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

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

◆ canReadResult()

canReadResult ( $userId)

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

◆ canRevote()

canRevote ( $userId)

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

◆ canVote()

canVote ( $userId)

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

◆ checkData()

checkData ( array & $data)

Checks array for correct data/

Аргументы
array&$dataArray( "TITLE" => "ABC...", "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|| ) ) );.
Возвращает
void
Исключения
AccessDeniedException

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

◆ delete()

delete ( )

Deletes attach and vote in some cases.

Возвращает
boolean;

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

◆ exportExcel()

exportExcel ( )

Exports data of voting into excel file

Возвращает
void
Исключения
InvalidOperationException

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

◆ fillStatistic()

fillStatistic ( )
Возвращает
void

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

◆ generateUid()

generateUid ( )
static

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

◆ getAttachId()

getAttachId ( )

Returns attachment id.

Возвращает
int|null

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

◆ getConnector()

getConnector ( )

Returns connector instance for attached object.

Возвращает
Connector|null
Исключения

Bitrix\Main\LoaderException

Исключения

Bitrix\Main\SystemException

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

◆ getData()

getData ( $id)
static

Return array where first key is attach array, second - vote array

Аргументы
integer$idAttach ID.
Возвращает
array|null

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

◆ getDataByEntity()

getDataByEntity ( array $id)
static

Returns array of attaches linked to special entity

Аргументы
array$idArray("ENTITY_TYPE" => "blog", "ENTITY_ID" => 89);.
Возвращает
mixed

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

◆ getEntityId()

getEntityId ( )

Returns entity id.

Возвращает
string

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

◆ getEntityType()

getEntityType ( )

Returns entity type.

Возвращает
string

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

◆ getModuleId()

getModuleId ( )

Returns module id.

Возвращает
string

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

◆ getStorage()

getStorage ( )
Возвращает
Channel

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

◆ getUserEventAnswers()

getUserEventAnswers ( int $eventId)

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

◆ getUserEventsAnswersStatByUserId()

getUserEventsAnswersStatByUserId ( int $userId)

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

◆ getVoteId()

getVoteId ( )

Returns vote id.

Возвращает
int|null

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

◆ init()

init ( )
Исключения
ArgumentException
ArgumentNullException
ObjectNotFoundException

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

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

◆ isFinished()

isFinished ( )

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

◆ isPublicVote()

isPublicVote ( )

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

◆ isVotedFor()

isVotedFor ( $userId)

Checks if current user voted for this vote.

Аргументы
int$userIdUser ID.
Возвращает
bool|int

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

◆ loadFromId()

loadFromId ( $id,
$shouldBeNewIfIdIsNull = false )
static
Аргументы
integer$idEntity ID.
bool$shouldBeNewIfIdIsNull
Возвращает
BaseObject

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

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

◆ offsetExists()

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

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

◆ offsetGet()

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

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

◆ offsetSet()

offsetSet ( $offset,
$value )

Is not supported.

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

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

◆ offsetUnset()

offsetUnset ( $offset)

Is not supported.

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

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

◆ recall()

recall ( int $userId,
string $actionUuid = '' )

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

◆ resume()

resume ( string $actionUuid = '')

Prolongs voting period.

Аргументы
string$actionUuidFrontend uid to send in push
Возвращает
void
Исключения
InvalidOperationException

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

◆ save()

save ( $data,
$createdBy = 0 )

Update vote data.

Аргументы
array$dataArray( "TITLE" => "ABC...", "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|| ) ) );.
int$createdByUser ID.
Возвращает
bool

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

◆ setStorage()

setStorage ( $id)
Аргументы
integer$id
Исключения
ArgumentNullException

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

◆ setVote()

setVote ( $vote)
Аргументы
int | Vote$vote

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

◆ stop()

stop ( string $actionUuid = '')

Finishes voting period

Аргументы
string$actionUuidFrontend uid to send in push
Возвращает
void
Исключения
InvalidOperationException

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

◆ voteFor()

voteFor ( array $request,
string $actionUuid = '' )

Voting for vote from current user $USER.

Аргументы
array$requestArray(" 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").
string$actionUuidFrontend uid to send in push
Возвращает
bool
Исключения
InvalidOperationException

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

Поля

◆ $attach

$attach
protected

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

◆ $channel

$channel
protected

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

◆ $connector

$connector
protected

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

◆ $loaded

$loaded
staticprotected
Инициализатор
"attachIds" => array(),
"voteIds" => array(),
"entities" => array()
)
</td ></tr ></table ></td ></tr >< tr >< td class="bx-popup-label bx-width30"><?=GetMessage("PAGE_NEW_TAGS")?> array( $site)
Определения file_new.php:804

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

◆ $storage

$storage = array()
static

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

◆ $vote

$vote
protected

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

◆ UID_LENGTH

const UID_LENGTH = 16

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


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