Squiz Matrix  4.12.2
 All Data Structures Namespaces Functions Variables Pages
Site Class Reference
Inheritance diagram for Site:
Folder Asset MySource_Object Web_Folder Web_Folder_Designs Web_Folder_Media Web_Folder_Users Web_Folder_Web_Services

Public Member Functions

 __construct ($assetid=0)
 
 lockTypes ()
 
 getWebPaths ($url=FALSE)
 
 addWebPath ($url)
 
 deleteWebPath ($url)
 
 delete ($release_lock=TRUE)
 
 getSiteURLs ()
 
 saveWebURLs (Array $save_urls)
 
 _morphCleanup ($new_type_code)
 
 updateLookups ()
 
 describeLink ($linkid)
 
 printFrontend ()
 
 printBody ()
 
 paintAsset (Asset $asset, $design=NULL, $layout=NULL)
 
 initLimbo ()
 
 getSpecialPageLink ($page)
 
 getSpecialPage ($page)
 
 getSiteNetwork ()
 
 getNetworkPrimaryURL ()
 
 getKeywordReplacement ($keyword)
 
 getEffectiveLastUpdatedTime ($assetids)
 
- Public Member Functions inherited from Folder
 Folder ($assetid=0)
 
 _getAllowedLinks ()
 
- 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 ()
 

Additional Inherited Members

- 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
 
- Protected Member Functions inherited from Folder
 _preCreateCheck (Array &$link)
 
 _createAdditional (Array &$link)
 
 _getName ($short_name=FALSE, $contextid=NULL)
 

Detailed Description

Definition at line 31 of file site.inc.

Constructor & Destructor Documentation

__construct (   $assetid = 0)

Constructor

Parameters
int$assetidthe asset id to be loaded

Definition at line 41 of file site.inc.

Member Function Documentation

_morphCleanup (   $new_type_code)

Clean up any sloppy seconds that are left over before we cast this asset for good In particular, remove out URLs and update the web paths of the kiddies

Parameters
string$new_type_codethe new type_code that this asset is being cast to
Returns
boolean private

Definition at line 418 of file site.inc.

addWebPath (   $url)

Attempts to add a url to this site, site's don't have paths, only URLs

Parameters
string$urlthe url to assign to this site
Returns
boolean public
See Also
Asset::updateLookups()

Definition at line 89 of file site.inc.

delete (   $release_lock = TRUE)

Delete this asset from the trash

Note that the asset MUST be in the trash to delete it FROM the trash.

Parameters
boolean$release_lockshould we realease the lock after deleting
Returns
boolean public

Definition at line 122 of file site.inc.

deleteWebPath (   $url)

Attempts to delete a path to this asset

Parameters
string$urlthe path to add to this asset's list
Returns
boolean public
See Also
Asset::updateLookups()

Definition at line 105 of file site.inc.

describeLink (   $linkid)

Return a human readable description of the passed link

Parameters
int$linkidthe link ID of the link to describe
Returns
string public

Definition at line 696 of file site.inc.

getEffectiveLastUpdatedTime (   $assetids)

Returns the most recent 'last modified time' among all component parts

If the site's URL is being loaded, normally the index page has already been loaded, and therefore does not count towards the "effective last updated" time. This is not satisfactory in assets where updates are not dependent on child assets (such as bodycopies). Make sure the index page is added to ensure this happens.

Parameters
array$assetidsid of all assets that get loaded during printFrontend
Returns
int public

Definition at line 1077 of file site.inc.

getKeywordReplacement (   $keyword)

Get 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

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

Definition at line 1031 of file site.inc.

getNetworkPrimaryURL ( )

Returns the primary URL of the Site Network in which this site exists (if any)

If this site iss not in a Site Network, or the network has not been configured, an empty string will be returned.

Returns
string public

Definition at line 1008 of file site.inc.

getSiteNetwork ( )

Returns the Site Network that this site exists in (if any)

If this site is not in a Site Network, NULL will be returned.

Returns
mixed object|NULL public

Definition at line 986 of file site.inc.

getSiteURLs ( )

Returns a list of urls that point to this asset

Returns
array public

Definition at line 155 of file site.inc.

getSpecialPage (   $page)

Returns the special page asset (index, not_found, forbidden)

Parameters
string$pagethe page that the user wants
Returns
object public

Definition at line 964 of file site.inc.

getSpecialPageLink (   $page)

Returns the link to the special page (index, not_found, forbidden) passed in

Parameters
string$pagethe page that the user wants
Returns
array public

Definition at line 937 of file site.inc.

getWebPaths (   $url = FALSE)

Returns the urls for this site

Parameters
boolean$urlUrl
Returns
array public
See Also
Asset::updateLookups()

Definition at line 72 of file site.inc.

initLimbo ( )

Initialise the limbo (simple-edit) interface by painting to the limbo outputter

Site puts its index page up for editing instead of itself

Returns
void public

Definition at line 908 of file site.inc.

lockTypes ( )

Returns a list of lock types available for this asset type

Returns
array public

Definition at line 54 of file site.inc.

paintAsset ( Asset  $asset,
  $design = NULL,
  $layout = NULL 
)

Paints an asset with the design that this site has currently applied to it.

If no design can be found fo this site, the page will be displayed without the design

Parameters
object&$assetthe asset to paint
object$designOverriding design asset
object$layoutOverriding paint layout asset
Returns
void public

Definition at line 784 of file site.inc.

printBody ( )

Called by the design to print the body of this asset

Returns
void public

Definition at line 760 of file site.inc.

printFrontend ( )

Prints out the Frontend for this asset Ensures the design of the index page is printed

Returns
void public

Definition at line 724 of file site.inc.

saveWebURLs ( Array  $save_urls)

Attempts to add a url to this site, site's don't have paths, only URLs

Return 1 if we complete ok but do not update, 2 for updated and 0 for failure

Parameters
array$save_urlsan Array($urlid => Array(url => '', http => boolean, https => boolean)
Returns
int public

Definition at line 202 of file site.inc.

updateLookups ( )

Called to force an update of this assets lookup information

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

Definition at line 436 of file site.inc.


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