Squiz Matrix  4.12.2
 All Data Structures Namespaces Functions Variables Pages
Page_Link_Manager Class Reference
Inheritance diagram for Page_Link_Manager:
Page_Asset_Listing Listing_Engine Page Asset MySource_Object

Public Member Functions

 __construct ($assetid=0)
 
 _createBodycopies ()
 
 _getDefaultBodycopyContent ($bodycopy_code)
 
 _getAllowedLinks ()
 
_getAssetLinks (&$asset, $no_cache=FALSE)
 
_getManagedAsset ()
 
 _getManagedAssetTypeName ()
 
 getAssetSelectionValue ($selection_name, $assetid)
 
 printBody ()
 
 printContents ()
 
 processAssetSelections ()
 
 processMinorLinks ($minor_id, $old_links=Array(), $new_links=Array(), $link_type)
 
 generateMessages ($fail_success)
 
getBodycopyContents ($name, $replacements=Array())
 
getBodycopy ($name)
 
 printBodycopyContents ()
 
 _getCommaSeparatedNamesByAssetid ($assetids)
 
 _getContentsKeywords ()
 
 getKeywordReplacement ($keyword)
 
 getErrorMessagesListKeywordReplacement ()
 
 getSuccessMessagesListKeywordReplacement ()
 
 _generateMessageList ($messages, $suffix)
 
 _getSelectionFieldNamePrefix ($selection_name)
 
- Public Member Functions inherited from Page_Asset_Listing
 __construct ($assetid=0)
 
 getAssetList ()
 
 _getAssetList ($group_by, $logic, $wanted_types, $root_asset_ids, $sort_info, $link_value_wanted=NULL)
 
 _getSortedAssetLists ($assets_to_list, $sort_info)
 
 _combineAssets ($logic='OR', $new_assets=Array(), $existing=NULL)
 
 _combineRootNodes ($assets=Array(), $root_nodes=Array(), $types=Array())
 
- Public Member Functions inherited from Listing_Engine
 __construct ($assetid=0)
 
 _createAdditional (&$link)
 
 _createBodycopies ()
 
 _getDefaultBodycopyContent ($bodycopy_code)
 
 lockTypes ()
 
 prepareLink (&$asset, $side_of_link, &$link_type, &$value, &$sort_order, &$dependant, &$exclusive)
 
 describeLink ($linkid)
 
 isDeletableLink ($linkid)
 
 cloneComponentsAdditional (&$clone, $components)
 
 _getAllowedLinks ()
 
getFolder ($type='type_formats')
 
 getFormats ($type='type_formats')
 
 printBody ()
 
 _getFormUrlComponents ()
 
 printNoResultsBodycopy (&$keywords)
 
 printContents ()
 
 _getCacheKey ()
 
 _getNumPerPage ()
 
 getAssetList ()
 
 sortAssetList ($asset_list, $sort_info)
 
 filterAssetList (&$todo)
 
 filterAssetStatuses (&$todo)
 
 filterAssetTypes (&$todo)
 
 getAllowedAssetTypeMap ()
 
 adjustAssetPositions (&$todo)
 
getChunk (&$children, &$replacements, $keywords, $result_page, $num_per_page, $group_by=NULL)
 
 _getPageList ($total_pages, $current_page, $window_size=NULL)
 
 _groupChunk (&$todo, &$chunk, &$remaining_count, $num_per_page, $group_limit=NULL)
 
 printAssetList ($todo)
 
 _printGroups (&$todo, $group_info)
 
 _printAssetList ($todo)
 
 _getShadowAssetKeywordReplacements ($assetid, $bc_keywords)
 
 _printAsset ($assetid, $list_position, $num_items=0)
 
_getTypeFormatBodycopy ($type_code)
 
 _getSelectionFieldNamePrefix ($selection_name)
 
 getSortableAssetInfo ()
 
 getRootNodes ($reload=TRUE)
 
 getExtendedAssetKeywordReplacements ()
 
 isDescending ()
 
 registerFormField ($field_name)
 
 getUsedFormFields ()
 
 getSortInfo ()
 
 groupAssetsRecursively ($group_levels, $assetids, &$results)
 
 limitAssetsRecursively (&$results, $limit_array)
 
 getGroupableParentAssetids ($child_assetid, $restrict_types=Array(), $direct_parent_only=FALSE)
 
convertProxyAssetTypes (&$results)
 
 _getGroupableParentAssetids ($child_assetid, $restrict_types=Array(), $root_nodes=Array(), $direct_parent_only=FALSE)
 
 sortGroups ($group_levels, $assetids, &$results)
 
 reindexGroupFormats ()
 
 processAssetSelections ()
 
 getAssetSelectionValue ($selection_name, $assetid)
 
 getAssetSelectionDefaults ()
 
 getAssetTargetDefaults ()
 
 _arrayCountRecursive (&$array, $limit=NULL)
 
 _getPositionFormats ()
 
 onRequestKeywords (&$broadcaster, $vars=Array())
 
 _getGenericSingleAssetFormatKeywords ($type=NULL)
 
 _getAdditionalSingleAssetFormatKeywords ()
 
 getAvailableKeywords ()
 
 _getContentsKeywords ()
 
 _getTypeFormatsKeywords ()
 
 _getGroupFolderKeywords ()
 
 getKeywordReplacement ($original_keyword)
 
 getContentsKeywordReplacements ($keywords=Array())
 
 getSortByKeywordReplacement ()
 
 getSortOrderKeywordReplacement ()
 
 getSubmitButtonKeywordReplacement ()
 
 getResetButtonKeywordReplacement ()
 
 getRootNodesKeywordReplacement ()
 
 getAssetTargetKeywordReplacement ($name)
 
 getStructuredRootNodeKeywordReplacement ()
 
 getSelectAllJSCodeKeywordReplacement ()
 
 _recurseCheckAllRelations (&$todo, &$relations, $prefix, $limit=NULL)
 
 _analyseCheckAllRelations ($todo)
 
 _buildRelationsJS ()
 
 _getFormSubmitMethod ()
 
 createNoResultsBodycopy ($enable_on_create=TRUE)
 
getNoResultsBodycopy ($only_if_enabled=TRUE)
 
 isNoResultsBodycopyEnabled ()
 
 setUseNoResultsBodycopy ($enabled)
 
- Public Member Functions inherited from Page
 __construct ($assetid=0)
 
 _getAllowedLinks ()
 
 printBody ()
 
- 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

 $bodycopies
 
 $errors
 
 $messages
 

Protected Member Functions

 _getName ($short_name=FALSE, $contextid=NULL)
 

Detailed Description

Definition at line 34 of file page_link_manager.inc.

Constructor & Destructor Documentation

__construct (   $assetid = 0)

Constructor

Parameters
int$assetidthe asset id to be loaded

Definition at line 53 of file page_link_manager.inc.

Member Function Documentation

_createBodycopies ( )

Creates bodycopies for this asset

Overridden, as the Page_Link_Manager needs an extra 'Not Logged In' bodycopy

Returns
boolean protected

Definition at line 69 of file page_link_manager.inc.

_generateMessageList (   $messages,
  $suffix 
)

Print out an unordered list

Parameters
array$messagesan array of messages to print
string$suffixthe suffix to bolt onto the asset prefix, to use as the list element classes
Returns
string private

Definition at line 745 of file page_link_manager.inc.

_getAllowedLinks ( )

Returns an array of all the permitted link type, the type asset and the cardinality

Returns
array private
See Also
Asset::_getAllowedLinks()

Definition at line 119 of file page_link_manager.inc.

& _getAssetLinks ( $asset,
  $no_cache = FALSE 
)

Return a list of assets the specified asset is linked, restricted to links where the asset is the minor, and by the link type and root node selected in the backend, in the format: Array(assetid => type)

Parameters
object&$assetthe asset to retrieve links from
boolean$no_cachemake sure the result isn't cached, and clear the cache for good measure
Returns
array private

Definition at line 171 of file page_link_manager.inc.

_getCommaSeparatedNamesByAssetid (   $assetids)

Takes an array of assetids and returns the asset names as a comma-separated string

Parameters
array$assetidsthe list of assetids to prettify
Returns
string private

Definition at line 622 of file page_link_manager.inc.

_getContentsKeywords ( )

Return the available keywords in the Page Contents Bodycopy for this asset

The return value is in the form:

Array(
    'keyword' => 'name',
)
Returns
array public

Definition at line 657 of file page_link_manager.inc.

_getDefaultBodycopyContent (   $bodycopy_code)

Get the default content for a bodycopy

Parameters
string$bodycopy_codeThe code name for the bodycopy
Returns
string private

Definition at line 97 of file page_link_manager.inc.

& _getManagedAsset ( )

Returns the asset to be managed - defauls to the current user if no asset is specified

Returns
object public

Definition at line 217 of file page_link_manager.inc.

_getManagedAssetTypeName ( )

Return the friendly name of the asset type of the managed asset

Returns
string private

Definition at line 248 of file page_link_manager.inc.

_getName (   $short_name = FALSE,
  $contextid = NULL 
)
protected

Returns name of the asset

Parameters
boolean$short_namewhether or not we are after the shortname or the full name
int$contextidwhat context to return the name from
Returns
string private
See Also
Asset::_getName()

Definition at line 138 of file page_link_manager.inc.

_getSelectionFieldNamePrefix (   $selection_name)

Get the prefix to use for input elements relevant to the specified selection

Parameters
string$selection_nameThe name of the selection
Returns
string protected

Definition at line 768 of file page_link_manager.inc.

generateMessages (   $fail_success)

Takes an associative array of assetids and writes relevant error/success messages to $this->[errors|messages] for later formatting

Parameters
array$fail_successTakes an array of success/failure messages (generated by processMinorLinks)
Returns
void public

Definition at line 511 of file page_link_manager.inc.

getAssetSelectionValue (   $selection_name,
  $assetid 
)

Provide the default values for each of the selection fields Link_Manager grabs its values from whatever folders the asset is linked to

Parameters
string$selection_namethe id of the asset selection
string$assetidthe assetid of the item to grab out of the cart
Returns
int public

Definition at line 269 of file page_link_manager.inc.

& getBodycopy (   $name)

Retrieves a bodycopy by name: returns the bodycopy object, or NULL if the name does not match any bodycopies.

Parameters
string$namethe name of the bodycopy to retrieve
Returns
mixed object|NULL private
See Also
Search_Page::bodycopies

Definition at line 568 of file page_link_manager.inc.

& getBodycopyContents (   $name,
  $replacements = Array() 
)

Retrieves a bodycopy's contents by name: returns the bodycopy's contents, or empty string if the name does not match any bodycopies

Parameters
string$namethe name of the bodycopy to retrieve
string$replacementsthe keyword replacements to apply to the contents
Returns
mixed string|NULL private
See Also
Search_Page::bodycopies
Search_Page::getBodycopy

Definition at line 541 of file page_link_manager.inc.

getErrorMessagesListKeywordReplacement ( )

Returns replacement for the error_messages_list keyword.

Returns
string private

Definition at line 716 of file page_link_manager.inc.

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

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

Definition at line 695 of file page_link_manager.inc.

getSuccessMessagesListKeywordReplacement ( )

Returns replacement for the error_messages_list keyword.

Returns
string private

Definition at line 729 of file page_link_manager.inc.

printBody ( )

Called by the design to print the body of this asset

Returns
void public

Definition at line 302 of file page_link_manager.inc.

printBodycopyContents ( )

Returns the contents of the bodycopy with all replacements made

Returns
string private
See Also
Asset::_getAllowLinks()

Definition at line 588 of file page_link_manager.inc.

printContents ( )

Called by the design to print the body of this asset

Returns
void public

Definition at line 321 of file page_link_manager.inc.

processAssetSelections ( )

Preprocess the Asset Selection values before displaying the page or redirecting Overwritten to handle the asset linking

Returns
boolean public

Definition at line 354 of file page_link_manager.inc.

processMinorLinks (   $minor_id,
  $old_links = Array(),
  $new_links = Array(),
  $link_type 
)

Handle linking this asset under multiple parents

Return an array of success/failure information

Parameters
int$minor_idasset we are going to link
array$old_linksThe current assets we are linked to
array$new_linksThe new selections we wish to be linked to
int$link_typetype of link to use
Returns
array public

Definition at line 461 of file page_link_manager.inc.

Field Documentation

$bodycopies
Initial value:
= Array(
'logged_in' => 'Logged In Layout',
'not_logged_in' => 'Not Logged In Layout',
)

Definition at line 37 of file page_link_manager.inc.


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