Squiz Matrix
4.12.2
|
Public Member Functions | |
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 | |
$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 | |
_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) | |
|
protected |
|
protected |
Returns TRUE if at least one of the passed assetids has the passed permission Does not check current status of lock
int | $perm | the permission to check access for |
array | $assetids | An array of user_group and/or user ids to check for permission If the array is empty, the current user will be checked |
boolean | $only_workflow | check only workflow |
|
protected |
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], ) |
_getAllowedLinks | ( | ) |
Returns an array of all the permitted links type, the type asset and the cardinality In the form
Array('[link_type]' => Array('[type_code]' => Array('card' => [cardinality], 'exclusive' => [exclusive]))); Where: link_type = SQ_LINK_TYPE_1|SQ_LINK_TYPE_2|SQ_LINK_TYPE_3|SQ_LINK_NOTICE cardinality = [max number of links]|'M' exclusive = TRUE|FALSE
|
protected |
Get bodycopy keyword replacement Provides a mechanism for providing keyword replacement functions by looking up the function named 'getKeywordNameKeywordReplacement' so an asset wishing to add support for 'best_ever' custom keyword should implement a function getBestEverKeywordReplacement() which returns a replacement string
Note that this function returns NULL for any keywords it doesn't recognise, unless the keyword begins with globals_
string | $keyword | Keyword to find a replacement for |
|
protected |
Return a name to use to describe this instance of the asset
This function should be overridden by children as it is used to set the name and short_name values for this asset when updating.
boolean | $short_name | whether or not we are after the shortname or the full name |
int | $contextid | what context to get the name in (override in kiddies) |
_loadDataPaths | ( | ) |
|
protected |
_morphCleanup | ( | $new_type_code | ) |
|
protected |
Perform any pre-validation required during the creation of this asset
For example, checking that attributes are set should bee 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], ) |
_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 indicate 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. |
accessEffective | ( | ) |
Returns true if permissions on this asset equal effective access
NB this function doesn't actually check permissions, but indicates whether having write or admin permissions actually allows you to edit the asset (which it doesn't if the status is all-approved or archived)
adminAccess | ( | $lock_type = '' , |
|
Array | $assetids = Array() |
||
) |
Returns TRUE if at least one of the passed assetids has admin access to this asset
string | $lock_type | the type of write access required - if blank returns a plain check against permissions set for this asset, otherwise returns effective access based on locking and status |
array | $assetids | an array of user_group and/or user ids to check for write access If the array is empty, the current user will be checked |
Asset | ( | $assetid = 0 | ) |
attr | ( | $name | ) |
& attrByRef | ( | $name | ) |
backendAccess | ( | ) |
canClone | ( | ) |
canCloneLink | ( | ) |
canCreateLink | ( | Asset | $minor, |
$link_type, | |||
$exclusive | |||
) |
Returns TRUE if the passed minor asset can be linked to this asset, or a string with the error msg
Asset | $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) |
canDelete | ( | ) |
canDeleteLink | ( | $linkid | ) |
canForceablyAcquireLock | ( | $lock_type | ) |
canliveEdit | ( | $lock_type | ) |
Returns TRUE if the current user could live edit this asset if they had the lock
Live edit means the asset is currently SQ_STATUS_LIVE but this user can edit the asset without going through a safe edit NOTE: will return FALSE if asset is not currently live
int | $lock_type | the type of lock |
Returns TRUE if the passed minor asset can be move-linked to this asset, or a string with the error msg
By default, use the same tests as being newly linked with a non-exclusive link (as all moved links are non-exclusive by moveLink() specification) - that is, call canCreateLink(). However this may not be appropriate for moves in some circumstances (cf. Sites within a Site Network) so this can be used to provide a different check for them. Remember that this is called for the asset we are moving TO - as it would have with canCreateLink().
Asset | $minor | the minor asset that we are linking to |
Asset | $old_major | the major asset that we are being moved from |
string | $link_type | the type of link this is |
checkAccess | ( | $perm, | |
$lock_type, | |||
Array | $assetids = Array() , |
||
$only_workflow = TRUE |
|||
) |
Returns TRUE if at least one of the passed assetids has the passed permission
Can perform effective access check based on current status, lock, workflow, and metadata NOTE: Only for write and above access
int | $perm | the permission to check access for |
string | $lock_type | the type of write access required - if blank returns a plain check against permissions set for this asset, otherwise returns effective access based on locking and status |
array | $assetids | An array of user_group and/or user ids to check for permission If the array is empty, the current user will be checked |
boolean | $only_workflow | check only workflow |
clearSystemVersion | ( | ) |
cloneComponents | ( | Asset | $clone, |
Array | $components, | ||
$override = FALSE |
|||
) |
Takes a clone shell and clones the sources required components to the clone shell (if the current user has the permissions on the clone shell to do so)
If $fail_on_error is TRUE, then cloneComponents will bail on the first error (default behaviour) - if not, however, cloneComponents will report the error and attempt to continue (returning FALSE in exceptional circumstances only)
Asset | $clone | the asset object that we are turning into a clone of this one |
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 | if TRUE, $this' permissions, metadata schemas, workflow schemas will override any existing ones already set on $clone |
ATTRIBUTES /// ///////////////
PERMISSIONS /// ////////////////
ROLES /// //////////
METADATA /// /////////////
WORKFLOW /// /////////////
DATA DIR /// /////////////
CONTENT TAGS /// /////////////////
cloneComponentsAdditional | ( | Asset | $clone, |
Array | $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.
Asset | $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'); |
cloneLinks | ( | Asset | $clone | ) |
Link the assets that are linked under this asset under the supplied clone shell too
Under the default cloning policy, this is done for notice and type 3 links only. Notice that the linked assets are not cloned - they end up linked to both this asset and the clone.
Asset:OO | $clone | The asset object that we are turning into a clone of this one |
create | ( | Array & | $link | ) |
Create this asset
The return value will be:
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], 'is_locked' => [0|1] ) |
createLink | ( | Asset | $minor, |
$link_type, | |||
$value = '' , |
|||
$sort_order = NULL , |
|||
$dependant = '0' , |
|||
$exclusive = '0' , |
|||
$moving = FALSE , |
|||
$locked = 0 |
|||
) |
Creates a link between this asset and the passed asset, of a certain type and returns the linkid of the created link
Asset | $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' on whether the this asset is dependant on the asset that will be linked by this new link |
string | $exclusive | '0' / '1' on whether the this asset is linked exclusivly to the asset that will be linked by this new link |
boolean | $moving | moving |
string | $locked | whether or not this asset's link is locked |
delete | ( | $release_lock = TRUE , |
|
$check_locked = TRUE |
|||
) |
deleteLink | ( | $linkid, | |
$check_locked = TRUE |
|||
) |
Remove a link where this asset is the major player
int | $linkid | the link id of the link to remove |
boolean | $check_locked | Check if the link is locked or not |
deleteLookupValue | ( | $layout_name, | |
$layout_value | |||
) |
Removes a lookup value from this asset and returns the list of values after modification
string | $layout_name | The name of the layout, can also be in notice link style, e.g. override::paint_layout::system::frontend |
string | $layout_value | The value that the layout has in the sq_lookup_values table |
describeLink | ( | $linkid | ) |
effectiveUnrestricted | ( | ) |
fastTrack | ( | $tasks | ) |
Fast Track is way of flagging on this asset, "it's currently safe to skip certain expensive tasks". This is useful when trying to avoid things like search reindexing from happening multiple times when it only needs to happen once (during asset creation for example).
As such, it's a less than ideal yet pragmatic way to find a "fast path" for the spaghetti that is asset builder / applying schemas / regenerating metadata / reindexing search in multiple context sauce.
e.g.
$asset->fastTrack(Array( 'metadata_manager_generate_content_file', 'search_manager_reindex_metadata', 'trigger_event_metadata_updated'));
// Do stuff that may trigger events in loops for those tasks..
$asset->unFastTrack(Array( 'metadata_manager_generate_content_file', 'search_manager_reindex_metadata', 'trigger_event_metadata_updated'));
// Now do those tasks once.
Mixed | $tasks | Identifiers to be fast tracked. |
getAssetKeywords | ( | $descriptions = FALSE | ) |
Return the keywords for this asset type with their replacements for this asset instance
This function is called in asset-listing situations like the asset listing, search page etc The return value is in the form:
Array( 'name' => Array ( 'value' => 'page', 'description' => 'the asset name', ), );
boolean | $descriptions | if TRUE descriptions will be included in the array |
getAssetStatusColourKeywordReplacement | ( | ) |
getAssetStatusDescriptionKeywordReplacement | ( | ) |
getAssetWebPathKeywordReplacement | ( | ) |
getAttribute | ( | $name, | |
$mute_errors = FALSE |
|||
) |
Returns a reference to the actual attribute object, used for manipulating the object
string | $name | the name of the attribute |
boolean | $mute_errors | stops the outputting of errors in this fn, needed because you can't use the '@' operator when returning by reference |
getAvailableKeywords | ( | ) |
getAvailableStatii | ( | ) |
getBackendHref | ( | $screen = '' , |
|
$backend_page = TRUE |
|||
) |
Returns the href for getting to the nearest backend for this asset
string | $screen | the code name of the screen that you want displayed when the asset is loaded |
boolean | $backend_page | whether to include the 'SQ_BACKEND_PAGE=main' query string include this bit when we are switching screens in the backend do not include when generating URL (e.g. for workflow emails) |
getContent | ( | ) |
getCurrentDesignName | ( | ) |
getCurrentPaintLayoutName | ( | ) |
getCustomKeywordReplacements | ( | $keywords = Array() , |
|
$invoke_backend = FALSE |
|||
) |
getDependantParentsURL | ( | ) |
getDesignLookups | ( | ) |
getEditFns | ( | ) |
getEditingLocks | ( | $keywords | ) |
getEffectiveLastUpdatedTime | ( | $assetids | ) |
Returns the most recent 'last modified time' among all component parts
used in conjunction with printFrontend to get a list of loaded asset ids see _sendHTTPHeaders() in mysource.inc for more information
array | $assetids | id of all assets that get loaded during printFrontend |
getEI | ( | ) |
Returns a reference to the Asset_Edit_Interface object for this asset type
getFaskTrackedTaskAssetids | ( | $task | ) |
getHref | ( | $base_url = NULL , |
|
$ignore_rollback = FALSE |
|||
) |
Returns the href for this asset closest to the $base_url, but relative to the current url
string | $base_url | the url that we are want to match closest to |
boolean | $ignore_rollback | ignore rollback checks in asset manager? this should only get set by the asset manager itself |
getKeywordReplacement | ( | $keyword | ) |
Get bodycopy keyword replacement Provides a mechanism for providing keyword replacement functions by looking up the function named 'getKeywordNameKeywordReplacement' so an asset wishing to add support for 'best_ever' custom keyword should implement a function getBestEverKeywordReplacement() which returns a replacement string
Note that this function returns NULL for any keywords it doesn't recognise, unless the keyword begins with globals_
string | $keyword | Keyword to find a replacement for |
getLanguages | ( | ) |
getLookups | ( | $field = '' | ) |
getLookupValues | ( | $inherited = NULL , |
|
$prefix = '' , |
|||
$like_search = TRUE , |
|||
$ignore_override = FALSE |
|||
) |
Returns a list of lookup value information associated with this asset matching the criteria
Return value is in the form
Array( [url] => Array( [name] => Array('value' => [value], 'inhd' => [inhd]), .... )
mixed | $inherited | it takes a mixed argument, boolean or NULL NULL = FALSE = return only parent values TRUE = return parents and children values |
string | $prefix | a prefix to search for in the name field of ast_lookup_value |
boolean | $like_search | TRUE = LIKE $prefix, FALSE = NOT LIKE $prefix |
boolean | $ignore_override | TRUE = ignore URLs with '/' appended to the end, i.e. URLs with override designs/layouts applied FALSE = return the URL with all its current design/layout information, i.e. the fact that a URL has an override design/layout applied will be transparent |
getPrefix | ( | ) |
getStatus | ( | ) |
Returns a status object for the current asset to be used for processing
getStatusDescription | ( | ) |
getTypeAncestors | ( | $include_asset = TRUE | ) |
Get an array of all assets types that the asset extends from
boolean | $include_asset | when TRUE adds the "Asset" type to the parent list, even though it's an unistantiable object |
getURL | ( | $base_url = NULL , |
|
$ignore_rollback = FALSE , |
|||
$base_contextid = NULL |
|||
) |
Returns the URL for this asset, closest to the $base_url
string | $base_url | the url that we are want to match closest to |
boolean | $ignore_rollback | ignore rollback checks in asset manager? this should only get set by the asset manager itself |
int | $base_contextid | the id of the context that we want the url from |
getURLs | ( | ) |
getValidProtocols | ( | ) |
getWebDataPath | ( | ) |
getWebPaths | ( | ) |
incrementVersion | ( | $number = 'micro' , |
|
$update_parents = TRUE |
|||
) |
Increments the version number of the asset based on the part of the version passed in
string | $number | the part of the version to update (major|minor|micro) |
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. |
initLimbo | ( | ) |
Initialise the limbo (simple-edit) interface by painting to the limbo outputter
This function should be overridden if assets want to expose another asset's interface instead of their own. By default, the normal backend is printed for the default screen.
isDeletableLink | ( | $linkid | ) |
linksUpdated | ( | ) |
Allow any required processesing to occur when any link is updated for the asset
Called whenever any type of link is changed. Allows caching of objects, links and other stuff to occur but not cause integrity issues during script execution. ONLY TO BE CALLED FROM THE ASSET MANAGER
liveEditAccess | ( | $lock_type | ) |
Returns TRUE if the current user can live edit this asset Live edit means the asset is currently SQ_STATUS_LIVE but this user can edit the asset without going through a safe edit NOTE: will return FALSE if asset is not currently live
string | $lock_type | the type of lock |
load | ( | $assetid | ) |
loadSystemVersion | ( | ) |
lockTypes | ( | ) |
|
protected |
Create an initial webpath for an asset This function is typically called by _createAdditional() Returns FALSE only if a web path cannot be saved
string | $path | an initial web path |
Asset | $parent_asset | asset under which this asset is being created (NULL is none) |
morph | ( | $new_type_code | ) |
Morph the asset to either one of its parent types or one of its children types
Only succeeds if $type_code assets are allowed to link to all children that this asset has. Since 3.18, we cannot do $this = $morphed, so we return the morphed obj if successful We also call forgetAsset and getAsset again to refresh the cache.
string | $new_type_code | the new type_code to attempt to cast this asset to |
onRequestKeywords | ( | Asset | $broadcaster, |
Array | $vars = Array() |
||
) |
Handle a request for available asset-type keywords
We set $vars['my_keyword'] = 'my keyword desc' to tell the broadcaster what keywords are available for this asset type.
Asset | $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 |
paintBackend | ( | Backend_Outputter | $o | ) |
Prints out the backend interface for the asset
Backend_Outputter | &$o | Backend_Outputter object |
permissionsUpdated | ( | ) |
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.
Asset | $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 | ( | ) |
printBodyWithPaintLayout | ( | $layout_id = '' | ) |
printFrontend | ( | ) |
printFrontendAsset | ( | Asset | $asset, |
$design = NULL |
|||
) |
Paint the passed asset on the frontend Override printFrontend() if you wish to pass a different asset to print
Asset | &$asset | the asset to print in frontend |
mixed | $design | the design to print the asset with |
printHead | ( | ) |
printLimbo | ( | ) |
Print the body of the limbo (simple-edit) interface
Asset types should only override this if they want to bypass or supplement the output of the backend outputter. If the backend outputter is not painted then initLimbo should be overridden too to avoid wasting effort populating the backend outputter.
processBackend | ( | Backend_Outputter | $o, |
Array & | $link | ||
) |
Processes a backend submission from this asset, returns TRUE if all OK Put's the array of processed attributes into $this->_tmp['process_attributes']
Backend_Outputter | $o | Backend_Outputter object |
array | &$link | information used to create the initial link |
processCustomKeywords | ( | $keywords = Array() | ) |
Processes anything that was previously printed for a custom keyword for LIMBO
An example of this might be a keyword replacement for a bodycopy. When submitted, we need to process The bodycopy here
array | $keywords | the keywords that were originally printed |
processStatusChange | ( | $new_status, | |
$update_parents = TRUE , |
|||
$run_updated = TRUE |
|||
) |
Processes the changes required when a new status is set
int | $new_status | the new status to set for this asset |
boolean | $update_parents | Specify if we want to update the parent as well |
boolean | $run_updated | specify it we want to run _upated |
readAccess | ( | Array | $assetids = Array() | ) |
reload | ( | ) |
remapAssetids | ( | Array | $map | ) |
replaceKeywordsInString | ( | $string | ) |
revertNoticeLinksToSystemVersion | ( | ) |
revertToSystemVersion | ( | ) |
saveAttributes | ( | $dont_run_updated = FALSE , |
|
$log_message = TRUE |
|||
) |
Save attributes set with setAttrValue to the database
boolean | $dont_run_updated | if TRUE this->_updated() won't be run |
boolean | $log_message | if FALSE attrubutes change won't be logged in system log |
saveSystemVersion | ( | ) |
saveWebPaths | ( | $paths, | |
$auto_add_remaps = TRUE |
|||
) |
setAttrValue | ( | $name, | |
$value | |||
) |
Queue the setting of the value of an attribute
This function sets the value of the attribute locally, but does not database updating. The change is queued awaiting the call of saveAttributes()
string | $name | the name of the attribute |
string | $value | the new value of the attribute |
setCharset | ( | $charset | ) |
setContent | ( | ) |
setDate | ( | $date_type, | |
$time = NULL , |
|||
$userid = NULL |
|||
) |
Modifies the specified date to the specified timestamp
The user field for the specified date is set to the userid specified. If none is specified, then the current user is used
string | $date_type | the date to update, which must be one of 'published' or 'created' |
int | $time | the time to set the date to. If NULL then use current time |
int | $userid | the userid that modified the specified date |
setForceSecure | ( | $force_secure | ) |
Set the status of the Force Secure Flag
Force Secure now takes on three possible options: '0' => don't force any protocol. '1' => force secure (HTTPS only) '-' => force insecure (HTTP only)
It will still also accept boolean TRUE|FALSE, which corresponds with '1' and '0' respectively.
Returns TRUE if the setting is successfully changed, FALSE otherwise. It is NOT considered a successful change if the force secure setting wouldn't actually change (in which case this function does nothing).
mixed | $force_secure | whether to force the use of SSL on URLs |
setLanguages | ( | Array | $languages | ) |
setLookupValues | ( | Array | $values | ) |
Set's the lookup values for this asset
array | $values | array of the values that we want to save "[url]" => array ( "[name]" => array ( "value" => "[value]", ), ), |
setPaintLayouts | ( | $layouts | ) |
Sets asset based paint layouts which apply to all of this asset's URLs
array | $layouts | Array of the paint layouts that we wish to apply. There are 2 types you can apply and both are optional. Array( 'paint_layout::system::frontend' => [assetid of paint layout], 'override::paint_layout::system::frontend' => [assetid of paint layout], ) |
shouldFastTrack | ( | $task, | |
$assetid = NULL |
|||
) |
Determine if the given task should be fast tracked. Generally called from the place doing the expensive task.
$task | string Task to fasttrack |
$assetid | int Asset associated with the task |
type | ( | ) |
unFastTrack | ( | $tasks | ) |
Remove the given task from being fast tracked, usually so that the caller can finally perform the given tasks sanely (once).
Mixed | $tasks | Identifiers to be removed from fast track. |
updateLookups | ( | $auto_add_remaps = TRUE | ) |
Called to force an update of this assets lookup information
boolean | $auto_add_remaps | whether to add remaps for this asset |
useSystemVersion | ( | ) |
writeAccess | ( | $lock_type = '' , |
|
Array | $assetids = Array() , |
||
$only_workflow = TRUE |
|||
) |
Returns TRUE if at least one of the passed assetids has write access to this asset
The extra parameter, $only_workflow, is currently only be used in determining read access for an asset before it goes live.
string | $lock_type | the type of write access required - if blank returns a plain check against permissions set for this asset, otherwise returns effective access based on locking and status |
array | $assetids | An array of user_group and/or user ids to check for write access If the array is empty, the current user will be checked |
boolean | $only_workflow | If TRUE (default), users with write access normally will be denied write access if outside the current step of the workflow. If FALSE, both those in the workflow and those with normal write access will be granted write access. |