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

Public Member Functions

 __construct ($assetid=0)
 
 _createAdditional (Array &$link)
 
 _createBodycopies ()
 
 _getDefaultBodycopyContent ($bodycopy_code)
 
 prepareLink (&$asset, $side_of_link, &$link_type, &$value, &$sort_order, &$dependant, &$exclusive)
 
 isDeletableLink ($linkid)
 
 _getAllowedLinks ()
 
 getSearchURL ()
 
 printFrontend ()
 
 printContents ()
 
 printResultsBody ($search=Array())
 
 processSearch ($search)
 
 onRequestKeywords (&$broadcaster, $vars=Array())
 
 getInitialBodyReplacements ($extra=Array())
 
 getResultsBodyReplacements ($search_results, $bc_name='results')
 
 getFunnelbackReplacement ($keyword, $search_results=Array(), $index=NULL, $type='site')
 
 getGeneralReplacement ($keyword, $extra, $spelling=Array())
 
 getSortOptions ()
 
getBodycopy ($name)
 
getBodycopyContents ($name, $replacements=Array())
 
 getFormatFolderLink ()
 
getFormatFolder ()
 
 getFormatBodycopyLink ($link_value)
 
getFormatBodycopy ($link_value)
 
 printFeaturedList ($results, $index)
 
 printFlusterList ($results, $type='site')
 
 printClusterList ($results, $index, $type='site')
 
 printNavigationList ($results, $index)
 
 printSpellList ($results)
 
 parseURL ($search)
 
 _stripURL ($url)
 
 processSearchSummary (&$xml)
 
 processSearchResults (&$xml)
 
- 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
 
 $defaults = Array('query_width' => 25)
 
 $keywords
 
- Data Fields inherited from Listing_Engine
 $requires_form = FALSE
 
 $performance_log_file_name = 'performance'
 
 $performance_threshold = 1000
 

Additional Inherited Members

- Protected Member Functions inherited from Listing_Engine
 _getAssetContentsBCKeywordReplacement (Asset $asset, $contextid=NULL)
 
 _getAssetContentsRawBCKeywordReplacement (Asset $asset, $contextid=NULL)
 
 _getAssetContentsPaintBCKeywordReplacement (Asset $asset, $paint_layout, $contextid=NULL)
 

Detailed Description

Definition at line 34 of file funnelback_search_page.inc.

Constructor & Destructor Documentation

__construct (   $assetid = 0)

Constructor

Parameters
int$assetidthe asset id to be loaded

Definition at line 149 of file funnelback_search_page.inc.

Member Function Documentation

_createAdditional ( Array &  $link)

Perform any additional processing required during the creation of this asset

For example, creating other child assets should be performed in this method

Parameters
array&$linkinformation used to create the initial link
Array (
  '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],
)
Returns
boolean private

Definition at line 177 of file funnelback_search_page.inc.

_createBodycopies ( )

Creates bodycopies for this asset

Override if different bodycopies are needed (eg. in search page).

Returns
boolean protected

Definition at line 259 of file funnelback_search_page.inc.

_getAllowedLinks ( )

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

Returns
array private
See Also
Asset::_getAllowLinks()

Definition at line 405 of file funnelback_search_page.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 291 of file funnelback_search_page.inc.

_stripURL (   $url)

Strip URL ( this de-funnelbacks urls ) ;)

Parameters
string$urlThe URL to strip
Returns
string public

Definition at line 2772 of file funnelback_search_page.inc.

& getBodycopy (   $name)

Retrieves a bodycopy by name

Returns the bodycopy, or NULL if the name does not match any bodycopies

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

Definition at line 1667 of file funnelback_search_page.inc.

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

Retrieves a bodycopy's contents by name

Parameters
string$namethe name of the bodycopy to retrieve
array$replacementsreplacements
Returns
mixed string|NULL public
See Also
Search_Page::bodycopies
Search_Page::getBodycopy

Definition at line 1693 of file funnelback_search_page.inc.

& getFormatBodycopy (   $link_value)

Returns the format bodycopy with the specifed link value

If the bodycopy does not exist, or it have a link type 3, NULL is returned as either no format has been customised, or the format feature has been disbled

Parameters
string$link_valuethe link value of the wanted bodycopy
Returns
object public

Definition at line 1774 of file funnelback_search_page.inc.

getFormatBodycopyLink (   $link_value)

Returns the link for a bodycopy with the specified link value

Parameters
string$link_valuethe link value of the link of the wanted bodycopy
Returns
array public

Definition at line 1752 of file funnelback_search_page.inc.

& getFormatFolder ( )

Returns the format folder where the format bodycopies live

Returns
object public

Definition at line 1730 of file funnelback_search_page.inc.

getFormatFolderLink ( )

Returns the link for the format folder

Returns
array public

Definition at line 1716 of file funnelback_search_page.inc.

getFunnelbackReplacement (   $keyword,
  $search_results = Array(),
  $index = NULL,
  $type = 'site' 
)

Get the Funnelback replacements

Parameters
string$keywordthe keyword of the wanted replacement
array$search_resultsthe search information used for the keywords
int$indexthe index for the item replacements
string$typethe type of fluster (USED only for flustering)
Returns
string public

Definition at line 830 of file funnelback_search_page.inc.

getGeneralReplacement (   $keyword,
  $extra,
  $spelling = Array() 
)

Returns replacements that that are common to the bodycopies

Parameters
string$keywordthe keyword of the wanted replacement
array$extrathe extra information that can be used by the initial bodycopy
array$spellingthe extra spelling information
Returns
string public

Definition at line 1384 of file funnelback_search_page.inc.

getInitialBodyReplacements (   $extra = Array())

Prints the initial bodycopy

Parameters
array$extraThe extra information that can be used by the initial bodycopy
Returns
void private

Definition at line 773 of file funnelback_search_page.inc.

getResultsBodyReplacements (   $search_results,
  $bc_name = 'results' 
)

Keyword-replaces for the results mode

Parameters
array$search_resultsthe results returned
string$bc_namethe name of the bodycopy to be printed (results | no_results)
Returns
array private

Definition at line 798 of file funnelback_search_page.inc.

getSearchURL ( )

Returns the search URL

Returns
string public

Definition at line 423 of file funnelback_search_page.inc.

getSortOptions ( )

Return the options for sort order

Returns
array public

Definition at line 1602 of file funnelback_search_page.inc.

isDeletableLink (   $linkid)

Returns TRUE if we can delete the passed link, or a string with the error msg

Parameters
int$linkidthe link id of the link to remove
Returns
mixed string|boolean public

Definition at line 363 of file funnelback_search_page.inc.

onRequestKeywords ( $broadcaster,
  $vars = Array() 
)

Add valid keywords for this asset to an array of keywords when asked

Parameters
object&$broadcasterthe asset that triggered the event
array$varsthe vars that get submitted by the broadcaster we add keywords to the $vars['keywords'] array
Returns
boolean private

Definition at line 708 of file funnelback_search_page.inc.

parseURL (   $search)

Parse the URL

Parameters
array$searchThe search vars
Returns
string public

Definition at line 2116 of file funnelback_search_page.inc.

prepareLink ( $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.

Parameters
object&$assetthe major or minor asset that we are linking to
string$side_of_linkthe side of the link we are on (major or minor)
string&$link_typethe type of link we are creating
string&$valuethe value that is to be associated with the link
string&$sort_orderthe 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
Returns
boolean public

Definition at line 342 of file funnelback_search_page.inc.

printClusterList (   $results,
  $index,
  $type = 'site' 
)

Prints the cluster bodycopy

Parameters
array$resultsThe current search summary
int$indexThe current cluster item
string$typeThe type of cluster to print
Returns
void public

Definition at line 1959 of file funnelback_search_page.inc.

printContents ( )

Called by the design to print the body of this asset

Returns
void public

Definition at line 470 of file funnelback_search_page.inc.

printFeaturedList (   $results,
  $index 
)

Prints the featured bodycopy

Parameters
array$resultsThe current search summary
int$indexThe current featured index number
Returns
void public

Definition at line 1874 of file funnelback_search_page.inc.

printFlusterList (   $results,
  $type = 'site' 
)

Prints the fluster bodycopy

Parameters
array$resultsThe current search summary
string$typeThe fluster category to print
Returns
void public

Definition at line 1916 of file funnelback_search_page.inc.

printFrontend ( )

Prints out the Frontend for this asset

Returns
void public

Definition at line 437 of file funnelback_search_page.inc.

printNavigationList (   $results,
  $index 
)

Prints the navigation bodycopy

Parameters
array$resultsThe current search summary
int$indexThe current navigation item
Returns
void public

Definition at line 2002 of file funnelback_search_page.inc.

printResultsBody (   $search = Array())

Prints the results bodycopy

Parameters
array$searchThe passed search variable used for stored searches
Returns
void private

Definition at line 584 of file funnelback_search_page.inc.

printSpellList (   $results)

Prints the spell bodycopy

Parameters
array$resultsThe current search summary
Returns
void public

Definition at line 2043 of file funnelback_search_page.inc.

processSearch (   $search)

Process the search and return the results n extra information

Parameters
array$searchThe passed search variable used for stored searches
Returns
array public

Definition at line 610 of file funnelback_search_page.inc.

processSearchResults ( $xml)

Process the search results information

Parameters
object&$xmlThe simplexml object with the goods!
Returns
array public

Result Node <result> <rank></rank> <score></score> <title></title> <collection></collection> <component></component> <live_url></live_url> <cache_url></cache_url> <date></date> <filesize></filesize> <filetype></filetype> <tier></tier> <docnum></docnum> <md f="T"></md> </result>

Definition at line 3039 of file funnelback_search_page.inc.

processSearchSummary ( $xml)

Process the search summary information

Parameters
object&$xmlThe simplexml object with the goods!
Returns
array public

<results_summary> <fully_matching></fully_matching> <partially_matching></partially_matching> <total_matching></total_matching> <num_ranks></num_ranks> <currstart></currstart> <currend></currend> <nextstart></nextstart> </results_summary>

<best_bets> <bb> <bb_trigger>matrix</bb_trigger> <bb_link>http://matrix.squiz.net/download/mysource-matrix</bb_link> <bb_title>Download MySource Matrix</bb_title> <bb_desc></bb_desc> </bb> </best_bets>

<contextual_navigation> <cluster_nav level="" url=""></cluster_nav> <category name="type" more=""> <cluster href="" count=""></cluster> <cluster href="" count=""></cluster> </category> <category name="topic" more=""> <cluster href="" count=""></cluster> <cluster href="" count=""></cluster> <more_link label="topic"></more_link> </category> <category name="site" more=""> <cluster href="" count=""></cluster> <cluster href="" count=""></cluster> </category> </contextual_navigation>

<spell> <url></url> <text></text> <map> <source_parameter></source_parameter> <suggest></suggest> <pos></pos> </map> </spell>

Definition at line 2787 of file funnelback_search_page.inc.

Field Documentation

$bodycopies
Initial value:
= Array(
'initial' => 'Initial Search Page Layout',
'results' => 'Results Page Layout',
'no_results' => 'No Results Page Layout',
)

Definition at line 41 of file funnelback_search_page.inc.


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