Squiz Matrix
4.12.2
|
Public Member Functions | |
Form_Section ($assetid=0) | |
_updated ($update_parents=TRUE) | |
_getAllowedLinks () | |
prepareLink (Asset $asset, $side_of_link, &$link_type, &$value, &$sort_order, &$dependant, &$exclusive) | |
cloneComponents (&$clone, $components, $override=FALSE) | |
_getName ($short_name=FALSE, $contextid=NULL) | |
getAsset ($shadowid, $type_code='', $mute_errors=FALSE) | |
getLinkById ($linkid, $assetid=0, $side_of_link='major') | |
countLinks ($assetid, $side_of_link='major', $link_types=0, $type_code='', $strict_type_code=TRUE, $ignore_linkid=0) | |
deleteAssetLink ($linkid, $moving=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) | |
getLineageFromURL ($assetid, $protocol, $url) | |
getAssetMapAssetInfo ($assetid) | |
fileRegeneration ($form_regen=TRUE) | |
generateJSCode () | |
getQuestions ($force=FALSE) | |
getQuestionAssets ($type_code=NULL) | |
getAllQuestionAssets ($type_code=NULL) | |
getQuestionByID ($questionid) | |
& | getQuestionByOrder ($orderid) |
attachQuestion ($type_code) | |
deleteQuestion (&$question) | |
getQuestionCount () | |
getSectionLinks () | |
printBody (Form $form, $submit_buttons=FALSE) | |
printDefaultFormat (Form $form, $submit_buttons=FALSE) | |
printCustomFormat (Form $form, $submit_buttons=FALSE) | |
printSemanticSummary () | |
createFormatBodycopy ($enable_on_create=TRUE) | |
& | getFormatBodycopy ($only_if_enabled=TRUE) |
isFormatBodycopyEnabled () | |
setUseFormatBodycopy ($enabled) | |
onRequestKeywords (&$broadcaster, $vars=Array()) | |
getDisplayKeywords ($include_submit_keywords=TRUE) | |
getResponseKeywords () | |
getDisplayKeywordReplacements ($generating=FALSE, $include_submit_keywords=TRUE, $form=NULL) | |
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 | |
$question_index = 0 | |
$question_col_width = 0 | |
$answer_col_width = 0 | |
$current_answers = Array() | |
$extra_data = Array() | |
$submission_errors = Array() | |
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 | |
Additional Inherited Members | |
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) | |
Definition at line 31 of file form_section.inc.
_getAllowedLinks | ( | ) |
Returns an array of all the permitted link type, the type asset and the cardinality
Definition at line 120 of file form_section.inc.
_getName | ( | $short_name = FALSE , |
|
$contextid = NULL |
|||
) |
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 |
Definition at line 279 of file form_section.inc.
_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. |
Definition at line 104 of file form_section.inc.
attachQuestion | ( | $type_code | ) |
attach a question to this form
FALSE if database problem or question already attached, TRUE if sucessful
string | $type_code | the type of the question to attach |
Definition at line 959 of file form_section.inc.
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 afnd/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.
Definition at line 431 of file form_section.inc.
createFormatBodycopy | ( | $enable_on_create = TRUE | ) |
Creates the format bodycopy
Returns false if bodycopy already exists
boolean | $enable_on_create | if true, will set the bodycopy to be enabled (TYPE_2 link) when it is created. If false, creates it disabled (TYPE_3 link). |
Definition at line 1283 of file form_section.inc.
deleteAssetLink | ( | $linkid, | |
$moving = FALSE |
|||
) |
Remove a link by id
int | $linkid | the link id of the link to remove |
boolean | $moving | TRUE if this delete is part of a move operation |
Implements Bridge.
Definition at line 451 of file form_section.inc.
deleteQuestion | ( | & | $question | ) |
delete a question to this form
returns FALSE if database problem or question already deleted, TRUE if sucessful
object | &$question | the question object to delete |
Definition at line 1018 of file form_section.inc.
fileRegeneration | ( | $form_regen = TRUE | ) |
regenerates the content file for this section
boolean | $form_regen | if TRUE the section will get all its forms to regen as well |
Definition at line 792 of file form_section.inc.
Form_Section | ( | $assetid = 0 | ) |
Constructor
int | $assetid | the asset id to be loaded |
Definition at line 79 of file form_section.inc.
generateJSCode | ( | ) |
writes JavaScript code for client side validation
This function assumes the skeleton of a JS validation function has been created around this code with a form variable named 'form' passed (this is done when generating the content file).
Definition at line 830 of file form_section.inc.
getAllQuestionAssets | ( | $type_code = NULL | ) |
Get all question assets attached to this section, including nested sections
string | $type_code | When specified, only return assets of this exact type |
Definition at line 901 of file form_section.inc.
getAsset | ( | $shadowid, | |
$type_code = '' , |
|||
$mute_errors = FALSE |
|||
) |
Returns a reference to the asset represented by the passed assetid
int | $shadowid | the shadow part asset id to be loaded (i.e part after the ':') |
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.
Definition at line 314 of file form_section.inc.
getAssetMapAssetInfo | ( | $assetid | ) |
Get asset info for use by asset map
string | $assetid | Full Asset id to get information for |
Implements Bridge.
Definition at line 774 of file form_section.inc.
getAssetMapLinks | ( | ) |
Used by asset map to return a asset map-style link array
Definition at line 588 of file form_section.inc.
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
returns array(int => string) returns an array of assetids and their 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.
Definition at line 700 of file form_section.inc.
getDisplayKeywordReplacements | ( | $generating = FALSE , |
|
$include_submit_keywords = TRUE , |
|||
$form = NULL |
|||
) |
Returns a list of display keywords for the questions handled by this section
Return format is (string => string) keyword => description
Definition at line 1530 of file form_section.inc.
getDisplayKeywords | ( | $include_submit_keywords = TRUE | ) |
Returns a list of display keywords for the questions handled by this section
return format is (string => string) keyword => description
boolean | $include_submit_keywords | If TRUE, keywords for submit/reset/errors will be made available. If calling from a single-page form, this will probably be FALSE since the form provides its own. |
Definition at line 1446 of file form_section.inc.
& getFormatBodycopy | ( | $only_if_enabled = TRUE | ) |
Returns the format bodycopy or NULL
boolean | $only_if_enabled | if true, will return NULL if the bodycopy is disabled. If false, will only return NULL if never created. |
Definition at line 1327 of file form_section.inc.
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 urls to check for -> null defaults it to current url |
Implements Bridge.
Definition at line 759 of file form_section.inc.
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') |
Definition at line 364 of file form_section.inc.
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 other 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.
Definition at line 487 of file form_section.inc.
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.
Definition at line 652 of file form_section.inc.
getQuestionAssets | ( | $type_code = NULL | ) |
Get the question assets directly attached to this section
string | $type_code | When specified, only return assets of this exact type |
Definition at line 873 of file form_section.inc.
getQuestionByID | ( | $questionid | ) |
get a specific question
int | $questionid | The id of the desired question |
Definition at line 924 of file form_section.inc.
& getQuestionByOrder | ( | $orderid | ) |
get specific question by order
int | $orderid | the sequence of the desired question |
Definition at line 940 of file form_section.inc.
getQuestionCount | ( | ) |
returns the count of questions linked to this section
Definition at line 1060 of file form_section.inc.
getQuestions | ( | $force = FALSE | ) |
get the section links attached to this form
boolean | $force | whether to force... something or not |
Definition at line 858 of file form_section.inc.
getResponseKeywords | ( | ) |
Returns a list of response keywords for the questions handled by this section
Return format is (string => string) keyword => description
Definition at line 1491 of file form_section.inc.
getSectionLinks | ( | ) |
get the links to any form sections that are nested within this form section
Definition at line 1077 of file form_section.inc.
isFormatBodycopyEnabled | ( | ) |
Returns whether the format bodycopy is enabled
Definition at line 1355 of file form_section.inc.
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 |
Definition at line 1419 of file form_section.inc.
prepareLink | ( | Asset | $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 |
Definition at line 165 of file form_section.inc.
printBody | ( | Form | $form, |
$submit_buttons = FALSE |
|||
) |
Paint the section contents.
Form | $form | The form we are printing from. We need to know this, since the section can be shared amongst other forms, but some settings are made at a Form level, such as client side validation. |
boolean | $submit_buttons | Whether to paint the submit and cancel buttons. If FALSE, these buttons will be blanked out upon painting. Will be set to TRUE in a multi-page form. |
Definition at line 1122 of file form_section.inc.
printCustomFormat | ( | Form | $form, |
$submit_buttons = FALSE |
|||
) |
Paints the form section using a custom format bodycopy
Form | $form | The form we are printing from |
boolean | $submit_buttons | Whether to paint the submit and cancel buttons. |
Definition at line 1193 of file form_section.inc.
printDefaultFormat | ( | Form | $form, |
$submit_buttons = FALSE |
|||
) |
Paints the form section using a default bodycopy
Form | $form | The form we are printing from |
boolean | $submit_buttons | Whether to paint the submit and cancel buttons. |
Definition at line 1143 of file form_section.inc.
setUseFormatBodycopy | ( | $enabled | ) |
Handles the enabling or disabling of the format bodycopy
boolean | $enabled | set to true to enable the format bodycopy, set to false to disable it |
Definition at line 1381 of file form_section.inc.