XpressEngine Core  1.11.2
 All Classes Namespaces Files Functions Variables Pages
Public Member Functions | List of all members
documentController Class Reference

controller class of the document module More...

Inheritance diagram for documentController:
document ModuleObject BaseObject

Public Member Functions

 init ()
 
 procDocumentVoteUp ()
 
 insertAlias ($module_srl, $document_srl, $alias_title)
 
 procDocumentVoteDown ()
 
 procDocumentDeclare ()
 
 deleteDocumentAliasByModule ($module_srl)
 
 deleteDocumentAliasByDocument ($document_srl)
 
 deleteDocumentHistory ($history_srl, $document_srl, $module_srl)
 
 triggerDeleteModuleDocuments (&$obj)
 
 addGrant ($document_srl)
 
 insertDocument ($obj, $manual_inserted=false, $isRestore=false, $isLatest=true)
 
 updateDocument ($source_obj, $obj, $manual_updated=FALSE)
 
 deleteDocument ($document_srl, $is_admin=false, $isEmptyTrash=false, $oDocument=null)
 
 _deleteDeclaredDocuments ($documentSrls)
 
 _deleteDocumentReadedLog ($documentSrls)
 
 _deleteDocumentVotedLog ($documentSrls)
 
 moveDocumentToTrash ($obj)
 
 updateReadedCount (&$oDocument)
 
 insertDocumentExtraKey ($module_srl, $var_idx, $var_name, $var_type, $var_is_required= 'N', $var_search= 'N', $var_default= '', $var_desc= '', $eid)
 
 deleteDocumentExtraKeys ($module_srl, $var_idx=null)
 
 insertDocumentExtraVar ($module_srl, $document_srl, $var_idx, $value, $eid=null, $lang_code= '')
 
 deleteDocumentExtraVars ($module_srl, $document_srl=null, $var_idx=null, $lang_code=null, $eid=null)
 
 updateVotedCount ($document_srl, $point=1)
 
 declaredDocument ($document_srl)
 
 updateCommentCount ($document_srl, $comment_count, $last_updater, $comment_inserted=false)
 
 updateTrackbackCount ($document_srl, $trackback_count)
 
 insertCategory ($obj)
 
 updateCategoryListOrder ($module_srl, $list_order)
 
 updateCategoryCount ($module_srl, $category_srl, $document_count=0)
 
 updateCategory ($obj)
 
 deleteCategory ($category_srl)
 
 deleteModuleCategory ($module_srl)
 
 moveCategoryUp ($category_srl)
 
 moveCategoryDown ($category_srl)
 
 addXmlJsFilter ($module_srl)
 
 procDocumentInsertCategory ($args=null)
 
 procDocumentMoveCategory ()
 
 procDocumentDeleteCategory ()
 
 procDocumentMakeXmlFile ()
 
 makeCategoryFile ($module_srl)
 
 getXmlTree ($source_node, $tree, $site_srl, &$xml_header_buff)
 
 getPhpCacheCode ($source_node, $tree, $site_srl, &$php_header_buff)
 
 addDocumentPopupMenu ($url, $str, $icon= '', $target= 'self')
 
 procDocumentAddCart ()
 
 procDocumentManageCheckedDocument ()
 
 procDocumentInsertModuleConfig ()
 
 procDocumentTempSave ()
 
 procDocumentGetList ()
 
 _checkCommentStatusForOldVersion (&$obj)
 
 _checkDocumentStatusForOldVersion (&$obj)
 
 updateUploaedCount ($documentSrlList)
 
 triggerCopyModuleExtraKeys (&$obj)
 
 triggerCopyModule (&$obj)
 
- Public Member Functions inherited from document
 moduleInstall ()
 
 checkUpdate ()
 
 moduleUpdate ()
 
 recompileCache ()
 
 getStatusList ()
 
 getDefaultStatus ()
 
 getConfigStatus ($key)
 
- Public Member Functions inherited from ModuleObject
 setModule ($module)
 
 setModulePath ($path)
 
 setRedirectUrl ($url= './', $output=NULL)
 
 getRedirectUrl ()
 
 setMessage ($message= 'success', $type=NULL)
 
 setMessageType ($type)
 
 getMessageType ()
 
 setRefreshPage ()
 
 setAct ($act)
 
 setModuleInfo ($module_info, $xml_info)
 
 stop ($msg_code)
 
 setTemplateFile ($filename)
 
 getTemplateFile ()
 
 setTemplatePath ($path)
 
 getTemplatePath ()
 
 setEditedLayoutFile ($filename)
 
 getEditedLayoutFile ()
 
 setLayoutFile ($filename)
 
 getLayoutFile ()
 
 setLayoutPath ($path)
 
 getLayoutPath ($layout_name="", $layout_type="P")
 
 proc ()
 
- Public Member Functions inherited from BaseObject
 __construct ($error=0, $message= 'success')
 
 setError ($error=0)
 
 getError ()
 
 setHttpStatusCode ($code= '200')
 
 getHttpStatusCode ()
 
 setMessage ($message= 'success', $type=NULL)
 
 getMessage ()
 
 add ($key, $val)
 
 adds ($object)
 
 get ($key)
 
 gets ()
 
 getVariables ()
 
 getObjectVars ()
 
 toBool ()
 
 toBoolean ()
 

Additional Inherited Members

- Public Attributes inherited from document
 $search_option = array('title','content','title_content','user_name',)
 
 $statusList = array('private'=>'PRIVATE', 'public'=>'PUBLIC', 'secret'=>'SECRET', 'temp'=>'TEMP')
 
- Public Attributes inherited from ModuleObject
 $mid = NULL
 string to represent run-time instance of Module (XE Module) More...
 
 $module = NULL
 Class name of Xe Module that is identified by mid. More...
 
 $module_srl = NULL
 integer value to represent a run-time instance of Module (XE Module) More...
 
 $module_info = NULL
 an object containing the module information More...
 
 $origin_module_info = NULL
 
 $xml_info = NULL
 an object containing the module description extracted from XML file More...
 
 $module_path = NULL
 a path to directory where module source code resides More...
 
 $act = NULL
 a string value to contain the action name More...
 
 $template_path = NULL
 a path of directory where template files reside More...
 
 $template_file = NULL
 name of template file More...
 
 $layout_path = ''
 a path of directory where layout files reside More...
 
 $layout_file = ''
 name of layout file More...
 
 $edited_layout_file = ''
 name of temporary layout files that is modified in an admin mode More...
 
 $stop_proc = FALSE
 a flag to indicating whether to stop the execution of code. More...
 
 $module_config = NULL
 
 $ajaxRequestMethod = array('XMLRPC', 'JSON')
 
 $gzhandler_enable = TRUE
 
- Public Attributes inherited from BaseObject
 $error = 0
 
 $message = 'success'
 
 $variables = array()
 
 $httpStatusCode = NULL
 

Detailed Description

controller class of the document module

Author
NAVER (devel.nosp@m.oper.nosp@m.s@xpr.nosp@m.esse.nosp@m.ngine.nosp@m..com)

Definition at line 11 of file document.controller.php.

Member Function Documentation

documentController::_checkCommentStatusForOldVersion ( $obj)

For old version, comment allow status check.

Parameters
object$obj
Returns
void

Definition at line 2490 of file document.controller.php.

documentController::_checkDocumentStatusForOldVersion ( $obj)

For old version, document status check.

Parameters
object$obj
Returns
void

Definition at line 2504 of file document.controller.php.

documentController::_deleteDeclaredDocuments (   $documentSrls)

Delete declared document, log

Parameters
string$documentSrls(ex: 1, 2,56, 88)
Returns
void

Definition at line 691 of file document.controller.php.

documentController::_deleteDocumentReadedLog (   $documentSrls)

Delete readed log

Parameters
string$documentSrls(ex: 1, 2,56, 88)
Returns
void

Definition at line 702 of file document.controller.php.

documentController::_deleteDocumentVotedLog (   $documentSrls)

Delete voted log

Parameters
string$documentSrls(ex: 1, 2,56, 88)
Returns
void

Definition at line 712 of file document.controller.php.

documentController::addDocumentPopupMenu (   $url,
  $str,
  $icon = '',
  $target = 'self' 
)

A method to add a pop-up menu which appears when clicking

Parameters
string$url
string$str
string$icon
string$target
Returns
void

Definition at line 2141 of file document.controller.php.

documentController::addGrant (   $document_srl)

Grant a permisstion of the document Available in the current connection with session value

Parameters
int$document_srl
Returns
void

Definition at line 182 of file document.controller.php.

documentController::addXmlJsFilter (   $module_srl)

Add javascript codes into the header by checking values of document_extra_keys type, required and others

Parameters
int$module_srl
Returns
void

Definition at line 1605 of file document.controller.php.

documentController::declaredDocument (   $document_srl)

Report posts

Parameters
int$document_srl
Returns
void|BaseObject

Definition at line 1202 of file document.controller.php.

documentController::deleteCategory (   $category_srl)

Delete a category

Parameters
int$category_srl
Returns
object

Definition at line 1447 of file document.controller.php.

documentController::deleteDocument (   $document_srl,
  $is_admin = false,
  $isEmptyTrash = false,
  $oDocument = null 
)

Deleting Documents

Parameters
int$document_srl
bool$is_admin
bool$isEmptyTrash
documentItem$oDocument
Returns
object

Definition at line 603 of file document.controller.php.

documentController::deleteDocumentAliasByDocument (   $document_srl)

Delete alias when document deleted

Parameters
int$document_srl
Returns
void

Definition at line 123 of file document.controller.php.

documentController::deleteDocumentAliasByModule (   $module_srl)

Delete alias when module deleted

Parameters
int$module_srl
Returns
void

Definition at line 111 of file document.controller.php.

documentController::deleteDocumentExtraKeys (   $module_srl,
  $var_idx = null 
)

Remove the extra variables of the documents

Parameters
int$module_srl
int$var_idx
Returns
BaseObject

Definition at line 959 of file document.controller.php.

documentController::deleteDocumentExtraVars (   $module_srl,
  $document_srl = null,
  $var_idx = null,
  $lang_code = null,
  $eid = null 
)

Remove values of extra variable from the document

Parameters
int$module_srl
int$document_srl
int$var_idx
string$lang_code
int$eid
Returns
$output

Definition at line 1051 of file document.controller.php.

documentController::deleteDocumentHistory (   $history_srl,
  $document_srl,
  $module_srl 
)

Delete document history

Parameters
int$history_srl
int$document_srl
int$module_srl
Returns
void

Definition at line 137 of file document.controller.php.

documentController::deleteModuleCategory (   $module_srl)

Delete all categories in a module

Parameters
int$module_srl
Returns
object

Definition at line 1500 of file document.controller.php.

documentController::getPhpCacheCode (   $source_node,
  $tree,
  $site_srl,
$php_header_buff 
)

Change sorted nodes in an array to the php code and then return When using menu on tpl, you can directly xml data. howver you may need javascrips additionally. Therefore, you can configure the menu info directly from php cache file, not through DB. You may include the cache in the ModuleHandler::displayContent()

Parameters
array$source_node
array$tree
int$site_srl
string$php_header_buff
Returns
array

Definition at line 2042 of file document.controller.php.

documentController::getXmlTree (   $source_node,
  $tree,
  $site_srl,
$xml_header_buff 
)

Create the xml data recursively referring to parent_srl In the menu xml file, node tag is nested and xml doc enables the admin page to have a menu
(tree menu is implemented by reading xml file from the tree_menu.js)

Parameters
array$source_node
array$tree
int$site_srl
string$xml_header_buff
Returns
string

Definition at line 1966 of file document.controller.php.

documentController::init ( )

Initialization

Returns
void

Definition at line 17 of file document.controller.php.

documentController::insertAlias (   $module_srl,
  $document_srl,
  $alias_title 
)

insert alias

Parameters
int$module_srl
int$document_srl
string$alias_title
Returns
object

Definition at line 54 of file document.controller.php.

documentController::insertCategory (   $obj)

Add a category

Parameters
object$obj
Returns
object

Definition at line 1367 of file document.controller.php.

documentController::insertDocument (   $obj,
  $manual_inserted = false,
  $isRestore = false,
  $isLatest = true 
)

Insert the document

Parameters
object$obj
bool$manual_inserted
bool$isRestore
Returns
object

Definition at line 194 of file document.controller.php.

documentController::insertDocumentExtraKey (   $module_srl,
  $var_idx,
  $var_name,
  $var_type,
  $var_is_required = 'N',
  $var_search = 'N',
  $var_default = '',
  $var_desc = '',
  $eid 
)

Insert extra variables into the document table

Parameters
int$module_srl
int$var_idx
string$var_name
string$var_type
string$var_is_required
string$var_search
string$var_default
string$var_desc
int$eid
Returns
object

Definition at line 915 of file document.controller.php.

documentController::insertDocumentExtraVar (   $module_srl,
  $document_srl,
  $var_idx,
  $value,
  $eid = null,
  $lang_code = '' 
)

Insert extra vaiable to the documents table

Parameters
int$module_srl
int$document_srl
int$var_idx
mixed$value
int$eid
string$lang_code
Returns
BaseObject|void

Definition at line 1026 of file document.controller.php.

documentController::makeCategoryFile (   $module_srl)

Save the category in a cache file

Parameters
int$module_srl
Returns
string

Definition at line 1846 of file document.controller.php.

documentController::moveCategoryDown (   $category_srl)

Move the category down

Parameters
int$category_srl
Returns
BaseObject

Definition at line 1560 of file document.controller.php.

documentController::moveCategoryUp (   $category_srl)

Move the category level to higher

Parameters
int$category_srl
Returns
BaseObject

Definition at line 1513 of file document.controller.php.

documentController::moveDocumentToTrash (   $obj)

Move the doc into the trash

Parameters
object$obj
Returns
object

Definition at line 722 of file document.controller.php.

documentController::procDocumentAddCart ( )

Saved in the session when an administrator selects a post

Returns
void|BaseObject

Definition at line 2160 of file document.controller.php.

documentController::procDocumentDeclare ( )

Action called when the post is reported by other member

Returns
void|BaseObject

Definition at line 96 of file document.controller.php.

documentController::procDocumentDeleteCategory ( )

Delete a category

Returns
void

Definition at line 1781 of file document.controller.php.

documentController::procDocumentGetList ( )

Return Document List for exec_xml

Returns
void|BaseObject

Definition at line 2462 of file document.controller.php.

documentController::procDocumentInsertCategory (   $args = null)

Add a category

Parameters
object$args
Returns
void

Definition at line 1643 of file document.controller.php.

documentController::procDocumentInsertModuleConfig ( )

Insert document module config

Returns
void

Definition at line 2360 of file document.controller.php.

documentController::procDocumentMakeXmlFile ( )

Xml files updated Occasionally the xml file is not generated after menu is configued on the admin page
The administrator can manually update the file in this case
Although the issue is not currently reproduced, it is unnecessay to remove.

Returns
void

Definition at line 1825 of file document.controller.php.

documentController::procDocumentManageCheckedDocument ( )

Move/ Delete the document in the seession

Returns
void|BaseObject

Definition at line 2233 of file document.controller.php.

documentController::procDocumentMoveCategory ( )

Move a category

Returns
void

Definition at line 1717 of file document.controller.php.

documentController::procDocumentTempSave ( )

Document temporary save

Returns
void|BaseObject

Definition at line 2396 of file document.controller.php.

documentController::procDocumentVoteDown ( )

Action to handle vote-up of the post (Down)

Returns
BaseObject

Definition at line 70 of file document.controller.php.

documentController::procDocumentVoteUp ( )

Action to handle vote-up of the post (Up)

Returns
BaseObject

Definition at line 25 of file document.controller.php.

documentController::triggerCopyModule ( $obj)

Definition at line 2552 of file document.controller.php.

documentController::triggerCopyModuleExtraKeys ( $obj)

Copy extra keys when module copied

Parameters
object$obj
Returns
void

Definition at line 2534 of file document.controller.php.

documentController::triggerDeleteModuleDocuments ( $obj)

A trigger to delete all posts together when the module is deleted

Parameters
object$obj
Returns
BaseObject

Definition at line 152 of file document.controller.php.

documentController::updateCategory (   $obj)

Update category information

Parameters
object$obj
Returns
object

Definition at line 1435 of file document.controller.php.

documentController::updateCategoryCount (   $module_srl,
  $category_srl,
  $document_count = 0 
)

Update document_count in the category.

Parameters
int$module_srl
int$category_srl
int$document_count
Returns
object

Definition at line 1415 of file document.controller.php.

documentController::updateCategoryListOrder (   $module_srl,
  $list_order 
)

Increase list_count from a specific category

Parameters
int$module_srl
int$list_order
Returns
object

Definition at line 1400 of file document.controller.php.

documentController::updateCommentCount (   $document_srl,
  $comment_count,
  $last_updater,
  $comment_inserted = false 
)

Increase the number of comments in the document Update modified date, modifier, and order with increasing comment count

Parameters
int$document_srl
int$comment_count
string$last_updater
bool$comment_inserted
Returns
object

Definition at line 1316 of file document.controller.php.

documentController::updateDocument (   $source_obj,
  $obj,
  $manual_updated = FALSE 
)

Update the document

Parameters
object$source_obj
object$obj
bool$manual_updated
Returns
object

Definition at line 361 of file document.controller.php.

documentController::updateReadedCount ( $oDocument)

Update read counts of the document

Parameters
documentItem$oDocument
Returns
bool|void

Definition at line 838 of file document.controller.php.

documentController::updateTrackbackCount (   $document_srl,
  $trackback_count 
)

Increase trackback count of the document

Parameters
int$document_srl
int$trackback_count
Returns
object

Definition at line 1345 of file document.controller.php.

documentController::updateUploaedCount (   $documentSrlList)

Definition at line 2510 of file document.controller.php.

documentController::updateVotedCount (   $document_srl,
  $point = 1 
)

Increase the number of vote-up of the document

Parameters
int$document_srl
int$point
Returns
BaseObject

Definition at line 1070 of file document.controller.php.


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