modules/KBDocuments/SearchUtils.php

Show: inherited
Table of Contents

Functions

functioncreate_fts_search_list_query(  $db,  $spec_SearchVars,  $searchVars,  $fullQuery = false ) : void

Parameters
Name Type Description
$db
$spec_SearchVars
$searchVars
$fullQuery
functioncreate_most_recent_articles_query(  $bean,  $order_by,  $where,  $keywords,  $row_offset,  $limit,  $date_filter ) : void

create_most_recent_articles_query

Parameters
Name Type Description
$bean
$order_by
$where
$keywords
$row_offset
$limit
$date_filter
functioncreate_most_viewed_articles_query(  $bean,  $order_by,  $where,  $keywords,  $row_offset,  $limit,  $date_filter,  $searchVars,  $spec_SearchVars ) : void

create_most_viewed_articles_query

Parameters
Name Type Description
$bean
$order_by
$where
$keywords
$row_offset
$limit
$date_filter
$searchVars
$spec_SearchVars
functioncreate_portal_list_query( \$bean $bean, \$order_by $order_by, \$where $where, \$keywords $keywords, \$row_offset $row_offset, \$limit $limit ) : \$result

create_portal_list_query This is the function that handles the searches called by the KB Portal code.

Parameters
Name Type Description
$bean \$bean

SugarBean instance (used to perform queries)

$order_by \$order_by

String SQL for ORDER BY clause

$where \$where

String SQL for additional WHERE clause

$keywords \$keywords

Array of keyword arguments ([most_recent_articles] and [most_viewed_articles] are special)

$row_offset \$row_offset

Integer value of row offset for LIMIT queries

$limit \$limit

Interger value of LIMIT number

Returns
Type Description
\$result The result set of resulting query
functioncreate_portal_most_recent_query( \DBManager $db, int $n = '10', string $where = '' ) : void

create_portal_most_recent_query() This method builds and returns query for most recent documents for portal

Parameters
Name Type Description
$db \DBManager

DB Manager

$n int

the number of articles to return. Default is 10

$where string

clause to use in where portion of query, if needed.

functiongetKBStyles( ) : void

functiongetQSApprover(  $form = 'EditView' ) : void

Parameters
Name Type Description
$form
functiongetQSAuthor(  $form = 'EditView' ) : void

Parameters
Name Type Description
$form
functiongetQSFileName( ) : void

functiongetQSMimeType( ) : void

functiongetQSTags(  $form = 'EditView' ) : void

Parameters
Name Type Description
$form
functionget_admin_fts_list(  $where,  $isMultiSelect = false ) : void

Parameters
Name Type Description
$where
$isMultiSelect
functionget_child_ids( string $root_id, \SugarBean $bean ) : \$results

get_child_ids This method returns an Array of id=>TagNode value pairs of the $root_id

Parameters
Name Type Description
$root_id string

The root id value to query for (i.e. the id column in kbtags table)

$bean \SugarBean

A sugarbean instance

Returns
Type Description
\$results Array of child id=>tag_name key/value pairs found where the root node is $root_id
functionget_child_tags(  $tag,  $bean ) : void

get_child_tags

Parameters
Name Type Description
$tag
$bean
functionget_faq_list(  $faq_id,  $bean ) : void

get_faq_list

Parameters
Name Type Description
$faq_id
$bean
functionget_fts_list(  $qry_arr,  $isMultiSelect = false,  $ajaxSort = false ) : void

Parameters
Name Type Description
$qry_arr
$isMultiSelect
$ajaxSort
functionget_kbdocument_body(  $kbdoc_id,  $bean ) : void

get_kbdocument_body

Parameters
Name Type Description
$kbdoc_id
$bean
functionget_tag_docs(  $tag,  $bean ) : void

get_tag_docs

Parameters
Name Type Description
$tag
$bean
functionrecursive_search( \$node $node, \$data $data, \$list $list, \$root_id $root_id, \$id $id,  $skip ) : void

recursive_search This is a recursive function to find documents linked to a particular root tag id.

Parameters
Name Type Description
$node \$node

The current TreeNode instance to search

$data \$data

The Array of all TreeNode(s)

$list \$list

The current Array of matching TreeNodes(s)

$root_id \$root_id

The root id value to search for

$id \$id

The current TreeNode id value being searched

$skip
functionreturn_attachment_filter(  $db,  $spec_SearchVars ) : void

Parameters
Name Type Description
$db
$spec_SearchVars
functionreturn_canned_query(  $db,  $canned_search_opt ) : void

Parameters
Name Type Description
$db
$canned_search_opt
functionreturn_date_filter(  $db,  $field,  $filter,  $filter_date = '',  $filter_date2 = '' ) : void

Parameters
Name Type Description
$db
$field
$filter
$filter_date
$filter_date2
functionreturn_view_frequency_filter(  $db,  $freq_search_opt ) : void

Parameters
Name Type Description
$db
$freq_search_opt
functionupdateKBView(  $kbid ) : void

Parameters
Name Type Description
$kbid
functionvalidate_quotes(  $quote_string ) : void

Parameters
Name Type Description
$quote_string

\TagNode

Package:

Properties

Propertypublic  $id= ''
Details
Type
n/a
Propertypublic  $name= ''
Details
Type
n/a
Propertypublic  $parent_id= ''
Details
Type
n/a

Methods

methodpublicTagNode(  $aId,  $aParentTagId,  $aTagName ) : void

Parameters
Name Type Description
$aId
$aParentTagId
$aTagName
Documentation was generated by DocBlox 0.18.1.