|
Squiz Matrix
4.12.2
|
Public Member Functions | |
| Simple_Form ($assetid=0) | |
| getAsset ($assetid, $type_code='', $mute_errors=FALSE) | |
| getLinks ($assetid, $link_types, $type_code='', $strict_type_code=TRUE, $side_of_link='major', $sort_by=NULL, $dependant=NULL, $exclusive=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) | |
| _getName ($short_name=FALSE, $contextid=NULL) | |
| _getAllowedLinks () | |
| createQuestion ($type_code, $name=NULL) | |
| deleteQuestion ($assetid) | |
| paintQuestion ($assetid) | |
| process () | |
| getErrors () | |
| getQuestions ($include_nested=FALSE) | |
| getAnswers () | |
| getAnswerValues () | |
| getAnswerSummaries () | |
| getAnswerExtraData () | |
| getClientSideJS () | |
| getClientSideFunction () | |
| onRequestKeywords (&$broadcaster, $vars=Array()) | |
| getDisplayKeywords ($prefix) | |
| getResponseKeywords ($prefix) | |
| getDisplayKeywordReplacement ($prefix) | |
| getResponseKeywordReplacement ($prefix) | |
| createFormatBodycopy ($enable_on_create=TRUE) | |
| & | getFormatBodycopy ($only_if_enabled=TRUE) |
| isFormatBodycopyEnabled () | |
| setUseFormatBodycopy ($enabled) | |
| printBody ($print_form_tags=TRUE, $submit_buttons=TRUE, $form_action='', $print_js=TRUE) | |
| printDefaultFormat ($submit_buttons=TRUE) | |
| printCustomFormat (&$bodycopy) | |
| printReceipt ($html=TRUE, $include_form_info=TRUE) | |
| deleteAssetLink ($linkid, $moving=FALSE) | |
| countLinks ($assetid, $side_of_link='major', $link_types=0, $type_code='', $strict_type_code=TRUE, $ignore_linkid=0) | |
| getAssetMapAssetInfo ($assetid) | |
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 () | |
Public Member Functions inherited from Bridge | |
| getLinks ($assetid, $link_types, $type_code='', $strict_type_code=TRUE, $side_of_link='major', $sort_by=NULL) | |
Data Fields | |
| $_errors = Array() | |
| $_answers = 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 34 of file simple_form.inc.
| _getAllowedLinks | ( | ) |
Returns an array of all the permitted link type, the type asset and the cardinality
Definition at line 543 of file simple_form.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 518 of file simple_form.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 1608 of file simple_form.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 1201 of file simple_form.inc.
| createQuestion | ( | $type_code, | |
$name = NULL |
|||
| ) |
Creates a question and adds it to the form
| string | $type_code | the type code of the question we want to add |
| string | $name | the name of the new question |
Definition at line 580 of file simple_form.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 1580 of file simple_form.inc.
| deleteQuestion | ( | $assetid | ) |
Deletes a question
| string | $assetid | the id of the question to delete |
Definition at line 621 of file simple_form.inc.
| getAnswerExtraData | ( | ) |
Return a list of answer extra data recorded from processed questions
Definition at line 859 of file simple_form.inc.
| getAnswers | ( | ) |
Return a list of full answer information recorded from processed questions
Returned array is in format:
Array(
assetid => Array(
'name' => string, // name of question
'type_code' => string, // type code of question
'value' => mixed, // raw value
'summary' => string, // question summary text
'extra_data' => mixed, // free-form metadata for result
'is_error' => boolean, // did this error out?
),
)
Definition at line 812 of file simple_form.inc.
| getAnswerSummaries | ( | ) |
Return a list of answer summaries recorded from processed questions
Definition at line 842 of file simple_form.inc.
| getAnswerValues | ( | ) |
Return a list of raw answer values recorded from processed questions
Definition at line 825 of file simple_form.inc.
| 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 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.
Definition at line 89 of file simple_form.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 1623 of file simple_form.inc.
| getAssetMapLinks | ( | ) |
Used by asset map to return a asset map-style link array
Definition at line 290 of file simple_form.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
| 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 411 of file simple_form.inc.
| getClientSideFunction | ( | ) |
Builds a JavaScript fn that can be called to initiate client-side validation
Definition at line 943 of file simple_form.inc.
| getClientSideJS | ( | ) |
Returns the client-side validation code to be placed before the form
Note that this is only defined in the simple form and not the section, as a form should be validated as a whole The return value of this function should be placed in a function that acts as an onSubmit handler. Any text relating to failed rules will be placed in the submission_errors array; do what you wish with those. If no validation rules exist, an empty string ('') will be returned.
Definition at line 886 of file simple_form.inc.
| getDisplayKeywordReplacement | ( | $prefix | ) |
Returns a list of display keywords for the questions handled by this section
Return format is (string => string) keyword => description
| string | $prefix | the prefix that should be applied to each keyword returned by this function |
Definition at line 1098 of file simple_form.inc.
| getDisplayKeywords | ( | $prefix | ) |
Returns a list of display keywords for the questions handled by this section
return format is (string => string) keyword => description
| string | $prefix | the prefix that should be applied to each keyword returned by this function |
Definition at line 1014 of file simple_form.inc.
| getErrors | ( | ) |
Return a list of errors from last time we processed the form
Definition at line 736 of file simple_form.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 1245 of file simple_form.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 url to check for -> NULL defaults it to current url |
Implements Bridge.
Definition at line 498 of file simple_form.inc.
| getLinks | ( | $assetid, | |
| $link_types, | |||
$type_code = '', |
|||
$strict_type_code = TRUE, |
|||
$side_of_link = 'major', |
|||
$sort_by = NULL, |
|||
$dependant = NULL, |
|||
$exclusive = 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) |
| boolean | $dependant | Whether we want dependant links, non-dependent or (NULL) don't care |
| boolean | $exclusive | Whether we want exclusive links, non-exclusive or (NULL) don't care |
Definition at line 150 of file simple_form.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 360 of file simple_form.inc.
| getQuestions | ( | $include_nested = FALSE | ) |
Return a list of full question information
Returned array is in the following format:
Array(
assetid => Array(
'name' => string, // name of question
'type_code' => string, // type code of question
'sort_order' => int // sort order (for asset map)
),
)
| boolean | $include_nested | if TRUE, return all the questions underneath this form (including those belonging to nested forms); otherwise, only return questions attached to this form |
Definition at line 762 of file simple_form.inc.
| getResponseKeywordReplacement | ( | $prefix | ) |
Returns a list of response keywords for the questions handled by this section
Return format is (string => string) keyword => description
| string | $prefix | the prefix that should be applied to each keyword returned by this function |
Definition at line 1156 of file simple_form.inc.
| getResponseKeywords | ( | $prefix | ) |
Returns a list of response keywords for the questions handled by this section
Return format is (string => string) keyword => description
| string | $prefix | the prefix that should be applied to each keyword returned by this function |
Definition at line 1057 of file simple_form.inc.
| isFormatBodycopyEnabled | ( | ) |
Returns whether the format bodycopy is enabled
Definition at line 1273 of file simple_form.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 989 of file simple_form.inc.
| paintQuestion | ( | $assetid | ) |
Calls a specified question to paint itself
| string | $assetid | the (shadow) asset ID of the question we need to paint |
Definition at line 656 of file simple_form.inc.
| printBody | ( | $print_form_tags = TRUE, |
|
$submit_buttons = TRUE, |
|||
$form_action = '', |
|||
$print_js = TRUE |
|||
| ) |
Paint the form
| boolean | $print_form_tags | print out the form tags |
| boolean | $submit_buttons | whether to paint the submit and cancel buttons |
| boolean | $print_js | print the client-side validation function (if any) |
Definition at line 1336 of file simple_form.inc.
| printCustomFormat | ( | & | $bodycopy | ) |
Paints the form using the custom format bodycopy
| object | &$bodycopy | the custom format bodycopy to be used |
Definition at line 1425 of file simple_form.inc.
| printDefaultFormat | ( | $submit_buttons = TRUE | ) |
Paints the form using a default format
| boolean | $submit_buttons | whether to paint the submit and cancel buttons |
Definition at line 1382 of file simple_form.inc.
| printReceipt | ( | $html = TRUE, |
|
$include_form_info = TRUE |
|||
| ) |
Print a standard receipt format
| boolean | $html | true - (default) to use HTML format false - use text format |
| boolean | $include_form_info | set to true to include form information (if false, the "Form Response" header will not be printed) |
Definition at line 1449 of file simple_form.inc.
| process | ( | ) |
| 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 1299 of file simple_form.inc.
| Simple_Form | ( | $assetid = 0 | ) |
Constructor
| string | $assetid | the ID of the asset to load, if any |
Definition at line 64 of file simple_form.inc.