Squiz Matrix
4.12.2
|
Public Member Functions | |
Form ($assetid=0) | |
create (&$link) | |
_createAdditional (&$link) | |
_getAllowedLinks () | |
linksUpdated () | |
cloneComponents (&$clone, $components, $override=FALSE) | |
cloneComponentsAdditional (&$clone, $components) | |
_cloneDIVContents ($content_type, $original_clones=Array(), $replace_keywords=Array()) | |
getAsset ($assetid, $type_code='', $mute_errors=FALSE) | |
getLinks ($assetid, $link_types, $type_code='', $strict_type_code=TRUE, $side_of_link='major', $sort_by=NULL) | |
getAssetMapLinks () | |
getParents ($shadowid, $type_code='', $strict_type_code=TRUE) | |
getChildren ($assetid, $type_code='', $strict_type_code=TRUE, $dependant=NULL, $sort_by=NULL) | |
_updated ($update_parents=TRUE) | |
canCreateLink (&$minor, $link_type, $exclusive) | |
prepareLink (&$asset, $side_of_link, &$link_type, &$value, &$sort_order, &$dependant, &$exclusive) | |
countLinks ($assetid, $side_of_link='major', $link_types=0, $type_code='', $strict_type_code=TRUE, $ignore_linkid=0) | |
getLineageFromURL ($assetid, $protocol, $url) | |
getPermission ($assetid, $permission, $granted=NULL, $and_greater=TRUE, $expand_groups=FALSE, $all_info=FALSE) | |
setPermission ($assetid, $userid, $permission, $granted) | |
deletePermission ($assetid, $userid, $permission) | |
getAssetInfo ($assetids, $type_code=Array(), $strict_type_code=TRUE, $field='') | |
assetExists ($assetids) | |
getLink ($assetid, $link_type=NULL, $type_code='', $strict_type_code=TRUE, $value=NULL, $side_of_link='major', $exclusive=NULL) | |
getLinkById ($linkid, $assetid=0, $side_of_link='major') | |
getLinkByAsset ($assetid, $other_assetid, $link_types=NULL, $value=NULL, $side_of_link='major', $force_array=FALSE, $dependant=NULL, $exclusive=NULL) | |
getAllChildLinks ($assetid, $link_type=0) | |
updateLink ($linkid, $link_type=NULL, $value=NULL, $sort_order=NULL) | |
deleteAssetLink ($linkid, $moving=FALSE) | |
getAssetMapAssetInfo ($assetid) | |
createAssetLink (&$major, &$minor, $link_type, $value='', $sort_order=NULL, $dependant='0', $exclusive='0', $moving=FALSE) | |
& | getQuestions () |
& | getAllQuestions () |
& | getQuestionAssets ($type_code=NULL) |
& | getAllQuestionAssets ($type_code=NULL) |
getQuestionAssetsOnPage ($page_number) | |
attachQuestion ($type_code) | |
deleteQuestion (&$question) | |
getQuestionCount () | |
getQuestionByID ($questionid) | |
& | getQuestionByOrder ($orderid) |
& | getSections () |
& | getAllSections () |
getSectionCount () | |
& | getSectionLinks () |
printBody () | |
getFormHeader () | |
getFormAction () | |
getPageContents ($page_number) | |
getFormFooter () | |
printPageContentsBodycopy () | |
printThankYouBodycopy () | |
printForm ($replacements=Array()) | |
printDefaultPageContents ($also_print_sections=TRUE) | |
getResumeSubmissionPageContents () | |
printStandard () | |
getExitPage () | |
createBodycopy ($name, $content=Array()) | |
& | getBodycopy ($name='', $link_type=SQ_LINK_TYPE_2) |
includeContentFile ($type='Standard') | |
getTotalPages () | |
getConfirmationPageContents () | |
getDefaultConfirmationPageContents () | |
fileRegeneration () | |
processPage ($page_number, $validate_page=TRUE, $mute_errors=FALSE) | |
repopulate () | |
printErrors () | |
getXML ($time=NULL) | |
printSummary ($html=FALSE) | |
printSemanticSummary () | |
getFormInfo () | |
generateJSCode () | |
getClientSideFunction () | |
completeSubmission () | |
finishForm () | |
getSubmissionsFolder ($link_value='submissions_folder') | |
createSubmissionsFolder ($folder_name, $link_value) | |
& | createSubmission ($create_in_completed=FALSE) |
& | getSubmissionAsset () |
updateSubmission (Form_Submission $submission_asset) | |
getIncompleteSubmissions () | |
getCurrentPageNumber () | |
getLatestPageNumber () | |
getTempFileUploadPath () | |
restoreFromSubmissionCookie () | |
updateSubmissionCookie () | |
convertSubmissionCookieToAsset () | |
onRequestKeywords (&$broadcaster, $vars=Array()) | |
_getPageContentsBodycopyKeywords () | |
_getSubmissionLimitReachedBodycopyKeywords () | |
_getThankYouBodycopyKeywords () | |
getDisplayKeywordReplacement ($keyword) | |
getCurrentPageContentsKeywordReplacement () | |
getCurrentPageNameKeywordReplacement ($current_page=NULL) | |
getPageNumberKeywordReplacement () | |
getTotalPagesKeywordReplacement () | |
getFormContentsKeywordReplacement () | |
getFormContentsNoSectionsKeywordReplacement () | |
getFormCaptchaKeywordReplacement () | |
getFormCaptchaImageKeywordReplacement () | |
getFormCaptchaFieldKeywordReplacement () | |
getFormCaptchaLinkKeywordReplacement () | |
getFormErrorsKeywordReplacement () | |
getFormErrorsMessageKeywordReplacement () | |
getSubmitButtonKeywordReplacement () | |
getSaveButtonKeywordReplacement () | |
getSaveConfirmationKeywordReplacement () | |
getSaveAndExitButtonKeywordReplacement () | |
getResetButtonKeywordReplacement () | |
getPreviousPageButtonKeywordReplacement () | |
getPageListKeywordReplacement () | |
_getThankYouKeywordReplacement ($keyword) | |
performFormSectionActions ($page_number) | |
_finaliseStepsActions () | |
getSubmissionCount () | |
printSubmissionLimitReachedBodycopy ($replacements=Array()) | |
Public Member Functions inherited from Asset | |
Asset ($assetid=0) | |
create (Array &$link) | |
load ($assetid) | |
_loadDataPaths () | |
reload () | |
canDelete () | |
delete ($release_lock=TRUE, $check_locked=TRUE) | |
useSystemVersion () | |
loadSystemVersion () | |
saveSystemVersion () | |
clearSystemVersion () | |
revertToSystemVersion () | |
revertNoticeLinksToSystemVersion () | |
_updated ($update_parents=TRUE) | |
type () | |
getTypeAncestors ($include_asset=TRUE) | |
incrementVersion ($number='micro', $update_parents=TRUE) | |
getLanguages () | |
setLanguages (Array $languages) | |
setCharset ($charset) | |
setForceSecure ($force_secure) | |
remapAssetids (Array $map) | |
morph ($new_type_code) | |
_morphCleanup ($new_type_code) | |
onRequestKeywords (Asset $broadcaster, Array $vars=Array()) | |
canClone () | |
cloneComponents (Asset $clone, Array $components, $override=FALSE) | |
cloneComponentsAdditional (Asset $clone, Array $components) | |
cloneLinks (Asset $clone) | |
getStatus () | |
getAvailableStatii () | |
getStatusDescription () | |
processStatusChange ($new_status, $update_parents=TRUE, $run_updated=TRUE) | |
setDate ($date_type, $time=NULL, $userid=NULL) | |
lockTypes () | |
canForceablyAcquireLock ($lock_type) | |
getEditingLocks ($keywords) | |
_getAllowedLinks () | |
createLink (Asset $minor, $link_type, $value='', $sort_order=NULL, $dependant='0', $exclusive='0', $moving=FALSE, $locked=0) | |
prepareLink (Asset $asset, $side_of_link, &$link_type, &$value, &$sort_order, &$dependant, &$exclusive) | |
canCreateLink (Asset $minor, $link_type, $exclusive) | |
canMoveLink (Asset $minor, Asset $old_major, $link_type) | |
describeLink ($linkid) | |
isDeletableLink ($linkid) | |
canDeleteLink ($linkid) | |
deleteLink ($linkid, $check_locked=TRUE) | |
linksUpdated () | |
canCloneLink () | |
saveAttributes ($dont_run_updated=FALSE, $log_message=TRUE) | |
setAttrValue ($name, $value) | |
attr ($name) | |
& | attrByRef ($name) |
getAttribute ($name, $mute_errors=FALSE) | |
getAssetKeywords ($descriptions=FALSE) | |
getAvailableKeywords () | |
getKeywordReplacement ($keyword) | |
getAssetWebPathKeywordReplacement () | |
getCustomKeywordReplacements ($keywords=Array(), $invoke_backend=FALSE) | |
processCustomKeywords ($keywords=Array()) | |
getContent () | |
setContent () | |
getEffectiveLastUpdatedTime ($assetids) | |
readAccess (Array $assetids=Array()) | |
writeAccess ($lock_type='', Array $assetids=Array(), $only_workflow=TRUE) | |
adminAccess ($lock_type='', Array $assetids=Array()) | |
backendAccess () | |
liveEditAccess ($lock_type) | |
canliveEdit ($lock_type) | |
effectiveUnrestricted () | |
checkAccess ($perm, $lock_type, Array $assetids=Array(), $only_workflow=TRUE) | |
accessEffective () | |
permissionsUpdated () | |
printFrontend () | |
printFrontendAsset (Asset $asset, $design=NULL) | |
getValidProtocols () | |
printHead () | |
printBody () | |
getCurrentPaintLayoutName () | |
getCurrentDesignName () | |
printBodyWithPaintLayout ($layout_id='') | |
initLimbo () | |
printLimbo () | |
paintBackend (Backend_Outputter $o) | |
getPrefix () | |
processBackend (Backend_Outputter $o, Array &$link) | |
getEI () | |
getEditFns () | |
getBackendHref ($screen='', $backend_page=TRUE) | |
getURL ($base_url=NULL, $ignore_rollback=FALSE, $base_contextid=NULL) | |
getURLs () | |
getHref ($base_url=NULL, $ignore_rollback=FALSE) | |
getWebDataPath () | |
getWebPaths () | |
saveWebPaths ($paths, $auto_add_remaps=TRUE) | |
getLookups ($field='') | |
getDesignLookups () | |
getLookupValues ($inherited=NULL, $prefix='', $like_search=TRUE, $ignore_override=FALSE) | |
deleteLookupValue ($layout_name, $layout_value) | |
setPaintLayouts ($layouts) | |
updateLookups ($auto_add_remaps=TRUE) | |
setLookupValues (Array $values) | |
getAssetStatusDescriptionKeywordReplacement () | |
getAssetStatusColourKeywordReplacement () | |
replaceKeywordsInString ($string) | |
fastTrack ($tasks) | |
unFastTrack ($tasks) | |
shouldFastTrack ($task, $assetid=NULL) | |
getFaskTrackedTaskAssetids ($task) | |
getDependantParentsURL () | |
Public Member Functions inherited from MySource_Object | |
MySource_Object () | |
__sleep () | |
__wakeup () | |
Data Fields | |
$current_answers = Array() | |
$extra_data = Array() | |
$active_section = NULL | |
$submission_errors = NULL | |
$submission_asset = NULL | |
Data Fields inherited from Asset | |
$id = 0 | |
$version = '' | |
$name = '' | |
$short_name = '' | |
$status | |
$languages = '' | |
$charset = '' | |
$force_secure = '0' | |
$created | |
$created_userid | |
$updated | |
$updated_userid | |
$published | |
$published_userid | |
$status_changed | |
$status_changed_userid | |
$_is_cacheable = FALSE | |
$vars = Array() | |
$_available_keywords = Array() | |
$data_path_suffix = '' | |
$data_path = '' | |
$data_path_public = '' | |
$_ser_attrs = FALSE | |
Data Fields inherited from MySource_Object | |
$_tmp | |
Protected Member Functions | |
_getName ($short_name=FALSE, $contextid=NULL) | |
_handleCompletedFileUploads () | |
_getConfirmationPageContentsBodycopyKeywords () | |
_getCommonQuestionKeywords (Form_Question $question, Asset $parent) | |
_getCommonSectionKeywords (Form_Section $section) | |
_getQuestionResponseKeywords (Form_Question $question, Asset $parent) | |
_getCaptchaDisplayKeywords () | |
_getMollomCaptchaDisplayKeywords () | |
Protected Member Functions inherited from Asset | |
_preCreateCheck (Array &$link) | |
_createAdditional (Array &$link) | |
_abortCreate ($trigger_level_changed=FALSE, $linkid=0) | |
_loadVars () | |
_getName ($short_name=FALSE, $contextid=NULL) | |
_getKeywordReplacement ($keyword) | |
_checkPermissionAccess ($perm, $assetids=Array(), $only_workflow=TRUE) | |
makeAndSaveInitialWebPath ($path, $parent_link=NULL) | |
_cloneDIVContents | ( | $content_type, | |
$original_clones = Array() , |
|||
$replace_keywords = Array() |
|||
) |
Clone the contents div assets
object | $content_type | The content type asset to be cloned |
array | $original_clones | An array containing the assetids of the original and cloned assets |
array | $replace_keywords | An array containing the keyword of the assets |
_createAdditional | ( | & | $link | ) |
Perform any additional processing required during the creation of this asset
For example, creating other child assets should be performed in this method
array | &$link | information used to create the initial linkArray ( 'asset' => [ref major asset to create link under], 'link_type' => SQ_LINK_?, 'value' => [link value], 'sort_order' => [link sort order], 'is_dependant' => [0|1], 'is_exclusive' => [0|1], ) |
_finaliseStepsActions | ( | ) |
_getAllowedLinks | ( | ) |
|
protected |
|
protected |
Get an array of question-related keywords applicable to all contexts
Form_Question | $question | The form question we getting keywords for |
Asset | $parent | (Form|Form_Section) parent asset |
|
protected |
Get an array of section-related keywords applicable to all contexts
Form_Section | $section | The form section we are gathering keywords for |
|
protected |
|
protected |
|
protected |
Returns name of the asset
boolean | $short_name | whether or not we are after the shortname or the full name |
int | $contextid | what context to return the name from |
_getPageContentsBodycopyKeywords | ( | ) |
|
protected |
Get an array of question-related keywords applicable to response contexts
"Response contexts" include: Thank You summary pages, Confirmation page,
Form_Question | $question | The form question we getting keywords for |
Asset | $parent | (Form|Form_Section) parent asset |
_getSubmissionLimitReachedBodycopyKeywords | ( | ) |
_getThankYouBodycopyKeywords | ( | ) |
_getThankYouKeywordReplacement | ( | $keyword | ) |
Get appropriate keywords for Thank You bodycopy and emails
This can be extended further down the line. For instance, Form_Email (the "standard" custom form asset in Matrix) adds referrer-related keywords.
string | $keyword | keyword to replace |
|
protected |
Handle file uploads for a complete submission
Does two things, depending on whether a create location is set:
_updated | ( | $update_parents = TRUE | ) |
Set the last updated info for this asset
Call this function when the asset has been changed in some way so we can indicated in the asset table when the asset was last changed and who by. This function will also increment the micro version number for the asset.
boolean | $update_parents | should we go through an update all our dependant parents as well ? NOTE: this is passed to incrementVersion to let it know that the parents should have their versions updated as well. |
assetExists | ( | $assetids | ) |
Determine if the passed assetid or assetids refer(s) to a valid asset in the system
Note that this will always return FALSE if you pass it a shadow asset
mixed | $assetids | the ID of the asset we are going to the check for existence or an array of assetids we want to check |
attachQuestion | ( | $type_code | ) |
canCreateLink | ( | & | $minor, |
$link_type, | |||
$exclusive | |||
) |
Returns TRUE if the passed minor asset can be linked to this asset, or a string with the error msg
object | &$minor | the minor asset that we are linking to |
string | $link_type | the type of link this is |
int | $exclusive | the exclusive status of the link (gets passed to canLinkToType) |
cloneComponents | ( | & | $clone, |
$components, | |||
$override = FALSE |
|||
) |
Clones certain specified components of the asset
object | &$clone | the clone asset shell |
array | $components | the wanted components to clone eg. Array( 'attributes', 'metadata_schemas', 'metadata', 'workflow', 'permissions', 'data', 'content_tags', 'roles', ); or alternately Array('all'); |
boolean | $override | whether or not to override the existing permission, metadata schemas, workflow schemas with the new ones. |
cloneComponentsAdditional | ( | & | $clone, |
$components | |||
) |
Perform any additional processing required during the cloning of this asset
This function is being called by asset_manager after the dependants of asset have been cloned.
object | &$clone | the clone asset shell |
array | $components | the wanted components to clone eg. Array ( 'attributes', 'metadata_schemas', 'metadata', 'workflow', 'permissions', 'data', ); or alternately Array('all'); |
completeSubmission | ( | ) |
Complete a submission and clean up
Does the following actions:
convertSubmissionCookieToAsset | ( | ) |
countLinks | ( | $assetid, | |
$side_of_link = 'major' , |
|||
$link_types = 0 , |
|||
$type_code = '' , |
|||
$strict_type_code = TRUE , |
|||
$ignore_linkid = 0 |
|||
) |
Return the number of links in the system that involve the specified asset
Can be restricted by either link type and/or asset type code
int | $assetid | id of the the $side_of_link asset |
string | $side_of_link | Which side of the link this (the current) asset is on ('major' or 'minor') |
int | $link_types | integer that can be the product of bitwise operations on the SQ_LINK_* constants |
mixed | $type_code | the type of asset that is linked (eg 'Page', 'File', etc) if an array returns link if matches any of the array values |
boolean | $strict_type_code | whether we are finding assets that are just a $type_code or $type_code and any of it's sub-classes |
int | $ignore_linkid | ignore the link represented by this link id when returning the count |
Implements Bridge.
create | ( | & | $link | ) |
createAssetLink | ( | & | $major, |
& | $minor, | ||
$link_type, | |||
$value = '' , |
|||
$sort_order = NULL , |
|||
$dependant = '0' , |
|||
$exclusive = '0' , |
|||
$moving = FALSE |
|||
) |
Create a link between the two supplied assets
object | &$major | the major asset that we are linking from |
object | &$minor | the minor asset that we are linking to |
string | $link_type | the type of link this is |
string | $value | the value that is to be associated with this link |
string | $sort_order | the position in the links list that this link should take, if null or less than zero places at end of list |
string | $dependant | '0' / '1' - whether the minor asset is dependant on the major |
string | $exclusive | '0' / '1' - whether the major asset is to be the minor's only parent |
boolean | $moving | whether or not this asset is being moved |
createBodycopy | ( | $name, | |
$content = Array() |
|||
) |
create a bodycopy and attach to the Bodycopies folder of the form
The $name attribute will also be used for the Link Value of the link between the form's Bodycopies folder and the new bodycopy. The name will be lowercased, spaces replaced with underscores, and assigned to the link value. So if 'Thank You' is the name of the bodycopy (for instance), it will be linked to the Bodycopies folder with the link value 'thank_you'. Returns boolean FALSE if the bodycopy already exists or if the creation failed for some reason, or TRUE if it was successfully created
string | $name | the name of the bodycopy to create |
& createSubmission | ( | $create_in_completed = FALSE | ) |
createSubmissionsFolder | ( | $folder_name, | |
$link_value | |||
) |
deleteAssetLink | ( | $linkid, | |
$moving = FALSE |
|||
) |
deletePermission | ( | $assetid, | |
$userid, | |||
$permission | |||
) |
Deletes a permission with the passed user or user_group
int | $assetid | the assetid for asset whose permissions to delete |
int | $userid | the id of the user or user_group to remove the permission from |
string | $permission | the permission code you are deleting |
deleteQuestion | ( | & | $question | ) |
delete a question to this form
Returns boolean FALSE if a database problem occurs or if question already attached, or TRUE if sucessful
object | &$question | the Form_Question object to delete |
fileRegeneration | ( | ) |
finishForm | ( | ) |
Form | ( | $assetid = 0 | ) |
generateJSCode | ( | ) |
getAllChildLinks | ( | $assetid, | |
$link_type = 0 |
|||
) |
& getAllQuestionAssets | ( | $type_code = NULL | ) |
& getAllQuestions | ( | ) |
& getAllSections | ( | ) |
getAsset | ( | $assetid, | |
$type_code = '' , |
|||
$mute_errors = FALSE |
|||
) |
Returns a reference to the asset represented by the passed assetid (or NULL on error)
int | $assetid | the full asset ID to be loaded |
string | $type_code | if this exists then this object is used to load the asset, if not then the DB is queried to find out the asset type |
boolean | $mute_errors | stops the outputting of errors in this fn, needed because you can't use the '@' operator when returning by reference |
Implements Bridge.
getAssetInfo | ( | $assetids, | |
$type_code = Array() , |
|||
$strict_type_code = TRUE , |
|||
$field = '' |
|||
) |
Returns an array of information about assets of the passed codes
If one value in $field then the return value is Array(assetid => '[field]'), otherwise Array(assetid => Array())
array | $assetids | an array of assets to limit |
mixed | $type_code | an asset type code, or array of typecodes, to limit results to |
boolean | $strict_type_code | ensure returned assets are of the passed type codes |
string | $field | single field from the asset table to return (along with the assetid) Default is all fields |
getAssetMapAssetInfo | ( | $assetid | ) |
getAssetMapLinks | ( | ) |
& getBodycopy | ( | $name = '' , |
|
$link_type = SQ_LINK_TYPE_2 |
|||
) |
getChildren | ( | $assetid, | |
$type_code = '' , |
|||
$strict_type_code = TRUE , |
|||
$dependant = NULL , |
|||
$sort_by = NULL |
|||
) |
Get all asset ids that are below the passed assetid in the various trees in which it exists
Return structure: Array(int => string) - asset id => type_code
int | $assetid | the id of the asset to get its children for |
string | array | $type_code | the type of asset that is linked (eg 'Page', 'File', etc) if an array returns link if matches any of the array values |
boolean | $strict_type_code | whether we are finding assets that are just a $type_code or $type_code and any of it's sub-classes |
boolean | $dependant | if TRUE, results will be filtered to assets that are dependants. If FALSE, results will all not be dependants. If NULL, results will not be filtered |
string | $sort_by | a field in the asset table you would like the results sorted by (eg. name, short_name etc) |
Implements Bridge.
getClientSideFunction | ( | ) |
getConfirmationPageContents | ( | ) |
getCurrentPageContentsKeywordReplacement | ( | ) |
getCurrentPageNameKeywordReplacement | ( | $current_page = NULL | ) |
getCurrentPageNumber | ( | ) |
getDefaultConfirmationPageContents | ( | ) |
getDisplayKeywordReplacement | ( | $keyword | ) |
getExitPage | ( | ) |
getFormAction | ( | ) |
getFormCaptchaFieldKeywordReplacement | ( | ) |
getFormCaptchaImageKeywordReplacement | ( | ) |
getFormCaptchaKeywordReplacement | ( | ) |
getFormCaptchaLinkKeywordReplacement | ( | ) |
getFormContentsKeywordReplacement | ( | ) |
getFormContentsNoSectionsKeywordReplacement | ( | ) |
getFormErrorsKeywordReplacement | ( | ) |
getFormErrorsMessageKeywordReplacement | ( | ) |
getFormFooter | ( | ) |
getFormHeader | ( | ) |
getFormInfo | ( | ) |
getIncompleteSubmissions | ( | ) |
getLatestPageNumber | ( | ) |
getLineageFromURL | ( | $assetid, | |
$protocol, | |||
$url | |||
) |
Returns an array of assetid's + info in the order that they propogate out from THIS BRIDGE'S url
string | $assetid | the id of the last asset in the lineage |
string | $protocol | the protocol to match -> null means it is ignored |
string | $url | the url to check for -> null defaults it to current url |
Implements Bridge.
getLink | ( | $assetid, | |
$link_type = NULL , |
|||
$type_code = '' , |
|||
$strict_type_code = TRUE , |
|||
$value = NULL , |
|||
$side_of_link = 'major' , |
|||
$exclusive = NULL |
|||
) |
Get details of a link with the specified characteristics
int | $assetid | id of the the $side_of_link asset |
int | $link_type | integer that should be a single integer of the SQ_LINK_* constants |
mixed | $type_code | the type of asset that is linked (eg 'Page', 'File', etc) if an array returns link if matches any of the array values |
boolean | $strict_type_code | whether we are finding an asset that is just a $type_code or potentially an inherited type or $type_code and any of it's sub-classes |
string | $value | the value that is associated with this link |
string | $side_of_link | Which side of the link this (the current) asset is on ('major' or 'minor') |
boolean | $exclusive | The exclusive status for the link must be this (if not null) |
getLinkByAsset | ( | $assetid, | |
$other_assetid, | |||
$link_types = NULL , |
|||
$value = NULL , |
|||
$side_of_link = 'major' , |
|||
$force_array = FALSE , |
|||
$dependant = NULL , |
|||
$exclusive = NULL |
|||
) |
Get details of the link(s) between the two specified assets
int | $assetid | id of the the $side_of_link asset |
int | $other_assetid | the asset on the other side of the link |
int | $link_types | integer that can be the product of bitwise operations on the SQ_LINK_* constants |
string | $value | the value that is associated with this link |
string | $side_of_link | Which side of the link the first assetid is on ('major' or 'minor') |
boolean | $force_array | force the results to return an array of links even if there is only one link |
boolean | $dependant | The dependant status for all the links must be this (if not null) |
boolean | $exclusive | The exclusive status for all the links must be this (if not null) |
getLinkById | ( | $linkid, | |
$assetid = 0 , |
|||
$side_of_link = 'major' |
|||
) |
Get details of the link with specified linkid
int | $linkid | id of the link were returning |
int | $assetid | id of the the $side_of_link asset if zero no check is made and both major and minor information is returned |
string | $side_of_link | Which side of the link the asset represented by $assetid is on ('major' or 'minor') |
getLinks | ( | $assetid, | |
$link_types, | |||
$type_code = '' , |
|||
$strict_type_code = TRUE , |
|||
$side_of_link = 'major' , |
|||
$sort_by = NULL |
|||
) |
Return all links that this asset has to any shadow assets
int | $assetid | id of the the $side_of_link asset |
int | $link_types | integer that can be the product of bitwise operations on the SQ_LINK_* constants |
string | array | $type_code | the type of asset that is linked (eg 'Page', 'File', etc) if an array returns link if matches any of the array values |
boolean | $strict_type_code | whether we are finding assets that are just a $type_code or $type_code and any of it's sub-classes |
string | $side_of_link | Which side of the link this (the current) asset is on ('major' or 'minor') |
string | $sort_by | a field in the asset table you would like the results sorted by (eg. name, short_name etc) |
Implements Bridge.
getPageContents | ( | $page_number | ) |
Print a single page of a multiple page form
Page number is 1-indexed. If there are unattached questions, this will be page 1, then the first section is page 2. If no unattached questions, the first section is page 1.
int | $page_number | The current page number |
getPageListKeywordReplacement | ( | ) |
getPageNumberKeywordReplacement | ( | ) |
getParents | ( | $shadowid, | |
$type_code = '' , |
|||
$strict_type_code = TRUE |
|||
) |
Get all asset ids that are above the passed assetid in the various trees in which it exists
int | $shadowid | the shadow ID of the shadow asset to get (ie. the part after the ':') |
string | array | $type_code | the type of asset that is linked (eg 'User', 'User_Group', etc) if an array returns link if matches any of the array values |
boolean | $strict_type_code | whether we are finding assets that are just a $type_code or $type_code and any of it's sub-classes |
Implements Bridge.
getPermission | ( | $assetid, | |
$permission, | |||
$granted = NULL , |
|||
$and_greater = TRUE , |
|||
$expand_groups = FALSE , |
|||
$all_info = FALSE |
|||
) |
Returns an array of all user or user_group assets that have the passed permission for the passed asset
int | $assetid | the assetid for asset whose permissions to get |
string | $permission | the permission code you are getting |
boolean | $granted | type of Access : null = all, TRUE = granted, FALSE = denied |
boolean | $and_greater | get effective permission (eg read access = read or write or admin) |
boolean | $expand_groups | expand user groups so only user ids get returned (NOTE: only valid if $all_info is FALSE) |
boolean | $all_info | when FALSE fn just returns an array of userids for those that have permission When TRUE fn returns all info about the permission in the form of Array(userid => granted) (NOTE: TRUE is only valid if $and_greater and $expand_groups are FALSE) |
getPreviousPageButtonKeywordReplacement | ( | ) |
& getQuestionAssets | ( | $type_code = NULL | ) |
getQuestionAssetsOnPage | ( | $page_number | ) |
getQuestionByID | ( | $questionid | ) |
& getQuestionByOrder | ( | $orderid | ) |
getQuestionCount | ( | ) |
& getQuestions | ( | ) |
getResetButtonKeywordReplacement | ( | ) |
getResumeSubmissionPageContents | ( | ) |
getSaveAndExitButtonKeywordReplacement | ( | ) |
getSaveButtonKeywordReplacement | ( | ) |
getSaveConfirmationKeywordReplacement | ( | ) |
getSectionCount | ( | ) |
& getSectionLinks | ( | ) |
& getSections | ( | ) |
& getSubmissionAsset | ( | ) |
getSubmissionCount | ( | ) |
getSubmissionsFolder | ( | $link_value = 'submissions_folder' | ) |
Get the submissions folder specified by the link value
If called with zero arguments, points to the "Completed Submissions" folder, as per previous behaviour. This SHOULD be called with an attribute as much as possible, though, to avoid ambiguity.
string | $link_value | The value of the link of the submissions folder to get |
getSubmitButtonKeywordReplacement | ( | ) |
getTempFileUploadPath | ( | ) |
Callback function to inform File Upload-type questions where to upload their incomplete submissions to
In our case, it is:
getTotalPages | ( | ) |
Returns the total number of pages in this form.
If multi-page form is DISABLED, then the whole form is one page. If ENABLED, then each top-level section becomes a page, and any unattached questions share one extra page, if any.
In either case, if the confirmation page is enabled, add one page.
getTotalPagesKeywordReplacement | ( | ) |
getXML | ( | $time = NULL | ) |
includeContentFile | ( | $type = 'Standard' | ) |
includes the content file for this form
Options available for $type:
string | $type | the type of content file to generate |
linksUpdated | ( | ) |
onRequestKeywords | ( | & | $broadcaster, |
$vars = Array() |
|||
) |
Add valid keywords for this asset to an array of keywords when asked
object | &$broadcaster | the asset that triggered the event |
array | $vars | the vars that get submitted by the broadcaster we add keywords to the $vars['keywords'] array |
performFormSectionActions | ( | $page_number | ) |
prepareLink | ( | & | $asset, |
$side_of_link, | |||
& | $link_type, | ||
& | $value, | ||
& | $sort_order, | ||
& | $dependant, | ||
& | $exclusive | ||
) |
Prepares for linking by checking that the link values are valid for this link
This function will be called if this asset is the major or minor party in the link, so the side_of_link flag should be checked to work out what side of the link this asset is on. The return value should indicate if any of the link fields were changed.
object | &$asset | the major or minor asset that we are linking to |
string | $side_of_link | the side of the link we are on (major or minor) |
string | &$link_type | the type of link we are creating |
string | &$value | the value that is to be associated with the link |
string | &$sort_order | the position in the links list that this link should take, |
string | &$dependant | '0' / '1' on whether the this asset is dependant on the asset that will be linked by the new link |
string | &$exclusive | '0' / '1' on whether the this asset is linked exclusivly to the asset that will be linked by the new link |
printBody | ( | ) |
printDefaultPageContents | ( | $also_print_sections = TRUE | ) |
printErrors | ( | ) |
printForm | ( | $replacements = Array() | ) |
Prints the form to screen
Parameter $replacements is DEPRECATED; consider placing additional replacements in a subclassed getDisplayKeywordReplacements(), or their own function, instead.
array | $replacements | a list of additional replacements that subclasses can use to insert additional keywords |
printPageContentsBodycopy | ( | ) |
printStandard | ( | ) |
printSubmissionLimitReachedBodycopy | ( | $replacements = Array() | ) |
printSummary | ( | $html = FALSE | ) |
printThankYouBodycopy | ( | ) |
processPage | ( | $page_number, | |
$validate_page = TRUE , |
|||
$mute_errors = FALSE |
|||
) |
Processes the specified page
int | $page_number | The page number to be processed |
boolean | $validate_page | If TRUE, the function will return FALSE if the question values are invalid or the CAPTCHA is incorrectly entered. This is usually only set TRUE when moving forward in the form |
boolean | $mute_errors | Mute validation error |
repopulate | ( | ) |
restoreFromSubmissionCookie | ( | ) |
setPermission | ( | $assetid, | |
$userid, | |||
$permission, | |||
$granted | |||
) |
Sets a permission for the passed user or user_group
int | $assetid | the assetid for asset whose permissions to set |
int | $userid | the id of the user or user_group to add the permission for |
string | $permission | the permission code you are adding |
boolean | $granted | whether this permission grants access or not |
updateLink | ( | $linkid, | |
$link_type = NULL , |
|||
$value = NULL , |
|||
$sort_order = NULL |
|||
) |
Update the details of an existing link
If any of the detail vars are NULL they are not updated.
int | $linkid | the link id of the link to update |
int | $link_type | the type of the link (one of the SQ_LINK_* constants) |
string | $value | the value to place on the link |
int | $sort_order | the position in the links list that this link should take, if less than zero places at end of list |
updateSubmission | ( | Form_Submission | $submission_asset | ) |
Updates the submission with the current page's processed data
Form_Submission | $submission_asset | The submission asset to update |
updateSubmissionCookie | ( | ) |