Tariqa
3.0
|
Public Member Functions | |
__construct ($config) | |
onInitialize () | |
getPageContent () | |
selectTemplate () | |
canProcessRequest () | |
getName () | |
getTitle () | |
getDescription () | |
getLink () | |
getBreadCrumb () | |
getHeaders () | |
getDefaultTemplateFile () | |
Static Public Member Functions | |
static | sortBriefcase ($criteria, $type_id, $user, $db) |
static | autoImport ($user, $db, $content_id) |
static | selectFolderForm ($folder_id, $type_id, $level, $user, $db, $translationTable, $just_options=false, $archive=false) |
static | applyTemplateFolder ($folder_id, $template_id, $overwrite, $user, $db) |
static | applyTemplateArticle ($content_id, $template_id, $overwrite, $user, $db) |
static | canModifyFolder ($user_id, $folder_id, $db) |
static | moveItemToFolder ($user_id, $db, $source_id, $dest_id, $dest_type) |
static | moveFolder ($user_id, $db, $source_id, $dest_id, $dest_type) |
static | archiveFolder ($user_id, $db, $folder_id) |
static | unarchiveFolder ($user_id, $db, $folder_id) |
static | emptyFolder ($user_id, $db, $folder_id, $type_id, $subfolders) |
static | addFolder ($user_id, $db, $parent_id, $type_id, $name) |
static | deleteFolder ($user_id, $db, $folder_id) |
static | renameFolder ($user_id, $db, $folder_id, $new_name) |
static | doSaveArticle ($user_id, $db, $folder_id, $type_id, $article_id, $title=null) |
static | doSaveText ($user_id, $db, $folder_id, $title, $text) |
static | deleteContent ($user_id, $db, $content_id) |
static | renameContent ($user_id, $db, $content_id, $new_name) |
static | saveSearch ($user_id, $db, $GET_data, $POST_data, $title, $folder_id) |
static | createFolderIfNotExists ($folder_name, $type_id, $user_id, $db) |
static | getRealURL ($url, $db) |
static | url ($ids, $db) |
Data Fields | |
const | TYPE_ARTICLE = 1 |
const | TYPE_DOCUMENT = 2 |
const | TYPE_LOCATION = 3 |
const | TYPE_SEARCH = 4 |
const | TYPE_SHARED_OBJECT = 5 |
const | CHECKBOX_SEL_TYPE = 'checkbox' |
const | UI_SEL_TYPE = 'ui' |
const | BRIEFCASE_DATE_SORT = 'date' |
const | BRIEFCASE_TITLE_SORT = 'title' |
const | BRIEFCASE_PUBLISHER_SORT = 'publisher' |
Protected Member Functions | |
strip_tags ($html, $download_images=false) | |
getExportFolderCond ($folder_id, $selected_ids, $field_name= 'folder_id') | |
exportArticles ($format=\MetaNull\Tools\xslTransform::FORMAT_PDF, $folder_id=null, $selected_ids=null, $level=0) | |
setArchived ($db, $folder_id, $value) | |
export ($type, $format=\MetaNull\Tools\xslTransform::FORMAT_PDF) | |
Static Protected Member Functions | |
static | changeFolderType ($folder_id, $type_id, $db) |
Protected Attributes | |
$selection = null | |
$sorting | |
$archive = false | |
$folder_id = null |
__construct | ( | $ | config | ) |
Construct the Module object
array | $config | The multidimentionnal array containing the application's configuration |
Reimplemented from mModule.
static addFolder | ( | $ | user_id, |
$ | db, | ||
$ | parent_id, | ||
$ | type_id, | ||
$ | name | ||
) | [static] |
Adds a folder to the briefcase
string | $user_id | The user identifier |
mMysql | $db | The database connection |
int | $_parent_id | The parent identifier |
int | $type_id | The type identifier |
string | $name | The name of the new folder public |
static applyTemplateArticle | ( | $ | content_id, |
$ | template_id, | ||
$ | overwrite, | ||
$ | user, | ||
$ | db | ||
) | [static] |
Apply a template to an external article saved in the briefcase. In case of success returns the new id or true, otherwise, returns false
int | $content_id | The content identifier |
int | $template_id | The template identifier |
boolean | $overwrite | If true, then overwrite the existing article |
tariqaUser | $user | The user identifier |
mMysql | $db | The database connection public |
static applyTemplateFolder | ( | $ | folder_id, |
$ | template_id, | ||
$ | overwrite, | ||
$ | user, | ||
$ | db | ||
) | [static] |
Apply a template to a folder saved from the briefcase. It returns two lists: failed and success.
int | $folder_id | The content identifier |
int | $template_id | The template identifier |
boolean | $overwrite | If true, then overwrite the existing article |
tariqaUser | $user | The user identifier |
mMysql | $db | The database connection public |
static archiveFolder | ( | $ | user_id, |
$ | db, | ||
$ | folder_id | ||
) | [static] |
Archives a folder
string | $user_id | The user identifier |
mMysql | $db | The database connection |
int | $folder_id | the folder identifier public |
static autoImport | ( | $ | user, |
$ | db, | ||
$ | content_id | ||
) | [static] |
Auto imports a shared article.
tariqaUser | $user | The user |
mMysql | $db | The database connection |
int | $content_id | The content identifier public |
static canModifyFolder | ( | $ | user_id, |
$ | folder_id, | ||
$ | db | ||
) | [static] |
Tells if a user can modify a folder
string | $user_id | The user identifier |
int | $folder_id | The folder identifier |
mMysql | $db | A database connection public |
Process all requests (this is the default module)
Reimplemented from mModule.
static changeFolderType | ( | $ | folder_id, |
$ | type_id, | ||
$ | db | ||
) | [static, protected] |
Change the type of a folder
int | $folder_id | The folder identifier |
int | $type_id | The new type identifier |
mMysql | $db | The database connection protected |
static createFolderIfNotExists | ( | $ | folder_name, |
$ | type_id, | ||
$ | user_id, | ||
$ | db | ||
) | [static] |
Creates a folder if it doesn't exists
string | $folder_name | the folder name |
int | $type_id | The type of folder to be created or checked |
string | $user_id | The current user |
mMysql | $db | The database connection public |
static deleteContent | ( | $ | user_id, |
$ | db, | ||
$ | content_id | ||
) | [static] |
Deletes an item from the briefcase
string | $user_id | The user identifier |
mMysql | $db | The database connection |
int | $content_id | The content identifier public |
static deleteFolder | ( | $ | user_id, |
$ | db, | ||
$ | folder_id | ||
) | [static] |
Deletes a briefcase folder
string | $user_id | The user identifier |
mMysql | $db | The database connection |
int | $folder_id | The folder identifier public |
static doSaveArticle | ( | $ | user_id, |
$ | db, | ||
$ | folder_id, | ||
$ | type_id, | ||
$ | article_id, | ||
$ | title = null |
||
) | [static] |
Saves an article to the briefcase
string | $user_id | The user identifier |
mMysql | $db | The database connection |
int | $folder_id | The folder identifier |
int | $type_id | The type identifier |
string | $article_id | The article identifier |
string | $title | The article title (for google engine) [OPTIONAL] public |
static doSaveText | ( | $ | user_id, |
$ | db, | ||
$ | folder_id, | ||
$ | title, | ||
$ | text | ||
) | [static] |
Saves a free text to the briefcase
string | $user_id | The user identifier |
mMysql | $db | The database connection |
int | $folder_id | The folder identifier |
string | $title | The title of the text |
string | $text | The text public |
static emptyFolder | ( | $ | user_id, |
$ | db, | ||
$ | folder_id, | ||
$ | type_id, | ||
$ | subfolders | ||
) | [static] |
Empty a folder
string | $user_id | The user identifier |
mMysql | $db | The database connection |
int | $folder_id | The folder identifier |
int | $type_id | The type identifier |
boolean | $subfolders | If true, also delete the subfolders public |
export | ( | $ | type, |
$ | format = \MetaNull\Tools\xslTransform::FORMAT_PDF |
||
) | [protected] |
Exports the briefcase
int | $type | What to export from the briefcase (articles, searches etc.) |
string | $format | The export format - default PDF [OPTIONAL] protected |
exportArticles | ( | $ | format = \MetaNull\Tools\xslTransform::FORMAT_PDF , |
$ | folder_id = null , |
||
$ | selected_ids = null , |
||
$ | level = 0 |
||
) | [protected] |
Exports the briefcase
string | $format | The output format - default PDF [OPTIONAL] |
string | $folder_id | The folder identifier: -1 if you don't want to consider the folders, null for root, folder_id for any folder [OPTIONAL] |
array | $selected_ids | The list of selected items to export [OPTIONAL] |
int | $level | The depth level [OPTIONAL] protected |
getBreadCrumb | ( | ) |
Return the items of the current breadcrumb path
Reimplemented from tariqa3Module.
getDescription | ( | ) |
getExportFolderCond | ( | $ | folder_id, |
$ | selected_ids, | ||
$ | field_name = 'folder_id' |
||
) | [protected] |
Gets the folder sql condition
int | $folder_id | The folder identifier |
array | $selected_ids | The selected articles |
string | $field_name | The field to check [OPTIONAL] protected |
getHeaders | ( | ) |
getLink | ( | ) |
getName | ( | ) |
Returns the name of the class (what it should appear in the menu public
Reimplemented from tariqa3Module.
getPageContent | ( | ) |
static getRealURL | ( | $ | url, |
$ | db | ||
) | [static] |
Gets the real URL from a search URL. The url can be an url from a redirected search, so in this case, just search for the real URL
string | $url | The url |
mMysql | $db | The database connection |
public
getTitle | ( | ) |
static moveFolder | ( | $ | user_id, |
$ | db, | ||
$ | source_id, | ||
$ | dest_id, | ||
$ | dest_type | ||
) | [static] |
Moves a folder to another folder
string | $user_id | The user identifier |
mMysql | $db | The database connection |
int | $source_id | The source folder identifier |
int | $dest_id | The destination folder identifier |
int | $dest_type | The destination type public |
static moveItemToFolder | ( | $ | user_id, |
$ | db, | ||
$ | source_id, | ||
$ | dest_id, | ||
$ | dest_type | ||
) | [static] |
Moves an item to a folder
string | $user_id | The user identifier |
mMysql | $db | The database connection |
int | $source_id | The source identifier |
int | $dest_id | The folder destination identifier |
int | $dest_type | The destination type public |
onInitialize | ( | ) |
static renameContent | ( | $ | user_id, |
$ | db, | ||
$ | content_id, | ||
$ | new_name | ||
) | [static] |
Renames a content item
string | $user_id | The user identifier |
mMysql | $db | The database connection |
int | $content_id | The content identifier |
string | $new_name | The new name public |
static renameFolder | ( | $ | user_id, |
$ | db, | ||
$ | folder_id, | ||
$ | new_name | ||
) | [static] |
Renames a folder
string | $user_id | The user identifier |
mMysql | $db | The database connection |
int | $folder_id | The folder identifier |
string | $new_name | The new name of the folder public |
static saveSearch | ( | $ | user_id, |
$ | db, | ||
$ | GET_data, | ||
$ | POST_data, | ||
$ | title, | ||
$ | folder_id | ||
) | [static] |
Saves a search to the briefcase
string | $user_id | The user identifier |
mMysql | $db | The database connection |
string | $GET_data | The search form GET data to be saved |
string | $POST_data | The search form POST data to be saved |
string | $title | The title of the search |
int | $folder_id | The folder identifier public |
static selectFolderForm | ( | $ | folder_id, |
$ | type_id, | ||
$ | level, | ||
$ | user, | ||
$ | db, | ||
$ | translationTable, | ||
$ | just_options = false , |
||
$ | archive = false |
||
) | [static] |
Retrieves the form for selecting a folder
int | $folder_id | The folder identifier |
int | $type_id | The type identifier |
int | $level | The current level |
tariqaUser | $user | The user identifier |
mMysql | $db | The database connection |
array | $translationTable | The translation matrix |
boolean | $just_options | If set to true, return only the option's HTML code [OPTIONAL] |
boolean | $archive | If set to true, returned the archived folders [OPTIONAL] public |
selectTemplate | ( | ) |
Retrieves the form for selecting a folder public
setArchived | ( | $ | db, |
$ | folder_id, | ||
$ | value | ||
) | [protected] |
Set the subfolders archived attribute
mMysql | $db | The database connection |
int | $folder_id | The folder identifier |
$value | The value of the parameter protected |
static sortBriefcase | ( | $ | criteria, |
$ | type_id, | ||
$ | user, | ||
$ | db | ||
) | [static] |
Sorts the briefcase
string | $criteria | The criteria to sort |
int | $type_id | The type of items to sort; |
tariqaUser | The user identifier | |
mMysql | $db | The database conneection protected |
strip_tags | ( | $ | html, |
$ | download_images = false |
||
) | [protected] |
String the HTML tags using xslt
string | $html | The html string |
boolean | $download_images | If true, then also download the images and give them a local link (1 - enabled, no proxy, 2 - enabled with proxy) [OPTIONAL] protected |
static unarchiveFolder | ( | $ | user_id, |
$ | db, | ||
$ | folder_id | ||
) | [static] |
Archives a folder
string | $user_id | The user identifier |
mMysql | $db | The database connection |
int | $folder_id | the folder identifier public |
static url | ( | $ | ids, |
$ | db | ||
) | [static] |
Generates an url for a given content_id
string[] | $ids The list of briefcase_content identifiers | |
mMysql | $db | The mysql connection public |
$archive = false [protected] |
$folder_id = null [protected] |
$selection = null [protected] |
$sorting [protected] |
const BRIEFCASE_DATE_SORT = 'date' |
const BRIEFCASE_PUBLISHER_SORT = 'publisher' |
const BRIEFCASE_TITLE_SORT = 'title' |
const CHECKBOX_SEL_TYPE = 'checkbox' |
const TYPE_ARTICLE = 1 |
const TYPE_DOCUMENT = 2 |
const TYPE_LOCATION = 3 |
const TYPE_SEARCH = 4 |
const TYPE_SHARED_OBJECT = 5 |
const UI_SEL_TYPE = 'ui' |