Squiz Matrix  4.12.2
 All Data Structures Namespaces Functions Variables Pages
Image_Variety Class Reference
Inheritance diagram for Image_Variety:
Asset MySource_Object

Public Member Functions

 Image_Variety ($assetid=0, $data=Array())
 
 setAttrValue ($name, $value)
 
 processStatusChange ($new_status, $update_parent=TRUE)
 
 saveAttributes ($dont_run_updated=FALSE)
 
 _updated ($update_parents=TRUE)
 
 canClone ()
 
 _getName ($short_name=FALSE)
 
 updateImage ($file_versioning=TRUE)
 
 deleteImage ()
 
 checkFileState ($public)
 
 updateLookups ()
 
 getWebDataPath ()
 
 getWebPaths ()
 
 paintBackend (&$o)
 
 printFrontend ()
 
 printImageTag ($alt, $title, $return=FALSE)
 
 getKeywordReplacement ($keyword)
 
 readAccess ($assetids=Array())
 
 writeAccess ($lock_type='', $assetids=Array())
 
 adminAccess ($lock_type='', $assetids=Array())
 
 liveEditAccess ($lock_type)
 
 checkAccess ($perm, $lock_type, $assetids=Array())
 
 _checkPermissionAccess ($perm, $assetids=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

 $_imageid = 0
 
 $_varietyid = 0
 
- 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

 _removePublicFile ()
 
 _updatePublicFile ()
 
- 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)
 

Detailed Description

Definition at line 31 of file image_variety.inc.

Member Function Documentation

_checkPermissionAccess (   $perm,
  $assetids = Array() 
)

Returns TRUE if at least one of the passed assetids has the passed permission Does not check current status of lock

Parameters
int$permthe permission to check access for
array$assetidsAn array of user_group and/or user ids to check for permission If the array is empty, the current user will be checked
Returns
boolean public

Definition at line 1059 of file image_variety.inc.

_getName (   $short_name = FALSE)

return the name of this question

Parameters
boolean$short_nameif TRUE, returns the short name
Returns
string private

Definition at line 239 of file image_variety.inc.

_removePublicFile ( )
protected

Look's after the removing of files in the public directory

Returns
boolean private

Definition at line 485 of file image_variety.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.

Parameters
boolean$update_parentsshould 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.
Returns
boolean private

Definition at line 208 of file image_variety.inc.

_updatePublicFile ( )
protected

Look's after the updating of files in the public directory Only call if File::usePublicPath() returns TRUE;

Returns
boolean private

Definition at line 512 of file image_variety.inc.

adminAccess (   $lock_type = '',
  $assetids = Array() 
)

Returns TRUE if at least one of the passed assetids has admin access to this asset

Parameters
string$lock_typethe 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$assetidsan array of user_group and/or user ids to check for write access If the array is empty, the current user will be checked
Returns
boolean public

Definition at line 989 of file image_variety.inc.

canClone ( )

Returns TRUE if this type of asset can be cloned

Returns
boolean public

Definition at line 224 of file image_variety.inc.

checkAccess (   $perm,
  $lock_type,
  $assetids = Array() 
)

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

Parameters
int$permthe permission to check access for
string$lock_typethe 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$assetidsAn array of user_group and/or user ids to check for permission If the array is empty, the current user will be checked
Returns
boolean public

Definition at line 1038 of file image_variety.inc.

checkFileState (   $public)

Look's after the placing and removing of out files in the public directory

Parameters
boolean$publicwhether we have are allowed to have files in the public dir or not
Returns
boolean public

Definition at line 439 of file image_variety.inc.

deleteImage ( )

Delete's the image file that we have created

Returns
boolean public

Definition at line 391 of file image_variety.inc.

getKeywordReplacement (   $keyword)

Get bodycopy keyword replacement

Parameters
string$keywordKeyword to find a replacement for
Returns
string public

Definition at line 870 of file image_variety.inc.

getWebDataPath ( )

Returns the href for this asset closest to the $base_url, but relative to the current url

Parameters
string$base_urlthe url that we are want to match closest to
Returns
string public

Definition at line 679 of file image_variety.inc.

getWebPaths ( )

Returns a list of paths that this asset has

Returns
array public

Definition at line 695 of file image_variety.inc.

Image_Variety (   $assetid = 0,
  $data = Array() 
)

Constructor

Parameters
string$assetidthe asset id to be loaded
Array$datathe shadow asset data that will construct this variety

Definition at line 54 of file image_variety.inc.

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

Parameters
string$lock_typeType of lock to check
Returns
boolean public
See Also
canliveEdit()

Definition at line 1013 of file image_variety.inc.

paintBackend ( $o)

Prints out the backend interface for the asset

Parameters
object&$oBackend_Outputter
Returns
boolean public

Definition at line 715 of file image_variety.inc.

printFrontend ( )

Prints out the frontend for this file with no design

Returns
void public

Definition at line 751 of file image_variety.inc.

printImageTag (   $alt,
  $title,
  $return = FALSE 
)

Prints the tag for an image

The output includes the width and height of the image, and the image name for the alt tag

Parameters
string$altthe alt tag content. If empty the alt var is used
string$titlethe alt tag content. If empty the and $alt is set, then that is used, otherwise the title var is used
boolean$returnif TRUE the tag will be returned
Returns
mixed string|void public

Definition at line 849 of file image_variety.inc.

processStatusChange (   $new_status,
  $update_parent = TRUE 
)

Processes the changes required when a new status is set

Ignore the status changes since the bridge handles it.

Parameters
int$new_statusthe new status to set for this asset
boolean$update_parentSpecify if we want to update the parent as well
Returns
boolean public

Definition at line 151 of file image_variety.inc.

readAccess (   $assetids = Array())

Returns TRUE if at least one of the passed assetids has read access to this asset

Parameters
array$assetidsAn array of user_group and/or user ids to check for read access If the array is empty, the current user will be checked
Returns
boolean public

Definition at line 941 of file image_variety.inc.

saveAttributes (   $dont_run_updated = FALSE)

Save attributes set with setAttrValue to the database

Overriding the asset.inc here to make sure that they are saved to the asset_image_variety table instead of asset_attribute.

Parameters
boolean$dont_run_updatedif TRUE this->_updated() won't be run (THIS IS ONLY EVER CALLED FROM Asset::create())
Returns
boolean public
See Also
setAttrValue()

Definition at line 171 of file image_variety.inc.

setAttrValue (   $name,
  $value 
)

Set the value for the passed variable to the passed value If the user changes the name of this file, we also need to update the file system

Parameters
string$namethe name of the attribute
string$valuethe new value of the attribute
Returns
boolean public

Definition at line 99 of file image_variety.inc.

updateImage (   $file_versioning = TRUE)

(Re)Create the image file from our parents original

Parameters
boolean$file_versioningWhether or not to use file versioning
Returns
boolean public

Definition at line 254 of file image_variety.inc.

updateLookups ( )

Called to force an update of this assets lookup information

Returns
boolean public
See Also
Asset::updateLookups(), Asset::saveWebPaths()

Definition at line 547 of file image_variety.inc.

writeAccess (   $lock_type = '',
  $assetids = Array() 
)

Returns TRUE if at least one of the passed assetids has write access to this asset

Parameters
string$lock_typethe 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$assetidsAn array of user_group and/or user ids to check for write access If the array is empty, the current user will be checked
Returns
boolean public

Definition at line 965 of file image_variety.inc.


The documentation for this class was generated from the following file: