SCHLIX\cmsApplication_List
Inherited from cmsApplication_Basic
Implements interface_cmsApplication_List
Inherits Contact_Messages, Core_ApplicationManager, Core_BannedIP, Core_CronScheduler, Core_EmailQueue, Core_Emailtemplate, Core_Error404, Core_HttpError, Core_LogViewer, Core_MacroManager, Core_MediaHeader, Core_Redirection, Core_ThemeManager, Core_Versioning, PersonalDataRequest, SiteManager, SiteManager_Hosts, Users_History, cmsApplication_CategorizedList
Implements interface_cmsApplication_List
Inherits Contact_Messages, Core_ApplicationManager, Core_BannedIP, Core_CronScheduler, Core_EmailQueue, Core_Emailtemplate, Core_Error404, Core_HttpError, Core_LogViewer, Core_MacroManager, Core_MediaHeader, Core_Redirection, Core_ThemeManager, Core_Versioning, PersonalDataRequest, SiteManager, SiteManager_Hosts, Users_History, cmsApplication_CategorizedList
Protected Attributes
protected | $_fieldname_items | |
protected | $table_items | |
protected | $_before_save_item_functions | = [] |
protected | $_after_save_item_functions | = [] |
protected | $_more_save_item_validations | = [] |
protected | $_checkSaveItemWritePermission | = true |
protected | $field_id | |
protected | $field_item_title | = 'title' |
protected | $number_of_listings_per_page | |
protected | $item_restore_keys_to_ignore | |
protected | $field_item_category_id | = 'category_id' |
protected | $sortable_item_fields | = [ ['key' => 'date_created', 'label' => 'Date Created'], ['key' => 'date_modified', 'label' => 'Date Modified'], ['key' => 'id', 'label' => 'Item ID'], ['key' => 'title', 'label' => 'Title'], ['key' => 'sort_order', 'label' => 'Sort Order'], ] |
protected | $default_item_options | = array ('display_pagetitle','display_item_summary_noread','display_item_created_by', 'display_item_date_created', 'display_item_date_modified') |
protected | $default_mainpage_options | = array ('display_items','display_item_summary_noread','display_item_created_by', 'display_item_date_created') |
protected | $item_meta_options | |
protected | $mainpage_meta_options |
Protected Methods
protected | getMaxDateFromArray($items) |
protected | pageCounterIncreaseImpression($id, $app_name, $data_fields, $table, $fieldname, $field_id, $reset=false) |
protected | __suggestNewNonDuplicateValueFromArray($key, $associative_array, $possible_duplicate) Suggest a non duplicate value from an associative array Internally used to prevent duplicate value in field name (usually virtual_filename)
|
protected boolean|null | restoreGeneric(int $id, string $id_field_name, double $version, array $current_item, string $table_name, array $keys_to_ignore) $Versioning $SystemDB $SystemLog
|
protected | setSaveStatusOK($retval, $id, $is_new=false) Internal helper to set the return value of save to OK.
|
protected | setSaveStatusError($retval, $id, $error_string_or_array) Internal helper to set the return value of save to OK.
|
protected | addErrorToSaveStatus(array $retval, string $error_string_or_array) Adds a string or an array to error list in the retval
|
protected | onAfterSaveItem(array $datavalues, array $original_datavalues, array $previous_item, array $retval) Do something after save item $Versioning $TagManager
|
protected array | modifyDataValuesBeforeSaveItem(array $datavalues) Set default save item variables
|
protected bool | __addHookToFunctionArray(array $array, object $object, string $function_name) Internal helper to add hook to function array
|
protected | refineFullTextSearchCriteria($keyword, $fields) |
protected array | fixSortableFields(array $fields, array $match_with_fields) Translate an array to the current language and match it with the other fields
|
protected | fixSortableItemFields() Translate label of sortable item fields and match it with item fields
|
Public Methods
public | __construct(string $app_description, string $table_items) Construct the class with the description and set the main tiem table name
|
public | getItemsToViewFromFullVirtualFilename($url, $enable_redirect_no_trailingslash_folder=false) |
public array | interpretFriendlyURL(string $urlpath) Returns an array of command, given $urlpath.
|
public string | createFriendlyURL(string $str) create SEO friendly URL. Format is action={...}¶m1={....}¶m2={...}
|
public string | getFullPathByItemID(int $item_id) Returns the path given item ID. e.g. /folder1/folder2/item.html $SystemDB
|
public | getNumberOfListingsPerPage() |
public | setNumberOfListingsPerPage($number) |
public string | getItemTableName() Returns the item's table name
|
public array | getItemCustomFields() Returns a list of custom fields for the item table
|
public | getItemTable() Returns the item's table
|
public | increaseItemPageView($id) |
public | resetItemPageView($id) |
public array | getItemFieldNames() Returns an array containing field names from $this->table_items
|
public string | getFieldID() Returns the ID field name from $this->table_items (usually just id)
|
public string | getFieldItemTitle() Returns the title field name from $this->table_items (usually just title)
|
public | delete(string $mixed_items_to_delete) Deletes items from table. The parameter $mixed_items_to_delete is a pipe-separated value of items, e.g. i4|i5|i1 $SystemDB
|
public int | getTotalItemCount(string $criteria='', bool $cache=false) Returns total item count with specified critiera (e.g. status > 0) $SystemDB
|
public array | getAllItems(type $fields=' *', type $extra_criteria='', int $start, int $end, string $sortby='', string $sortdirection='ASC', bool $from_cache=false) Queries $this->table_items
|
public array | getItemByID(int $id, bool $from_cache=false) Returns any object by ID $SystemDB
|
public array | getAnyObjectByGUID(string $guid) Returns an item with specified GUID $SystemDB
|
public array | getItemByIDWithExtraData(int $id) Returns an item with additional data gathered by calling hook function
|
public array | getItemsByVirtualFilename(string $input_filename, int $category_id=-1) Returns one or more item with the same virtual filename. Used in later classes. There's a parameter $category_id that's not supposed to be in this class but it's there for compatibility with inherited classes $SystemDB
|
public | getBreadCrumbsByItemID($item_id) |
public | displayPageMetaDescription() Displays a HTML-encoded page meta description
|
public | displayPageMetaKeywords() Displays a HTML-encoded page meta keywords
|
public string | getPageMetaDescription() Returns a non-HTML encoded string of meta description
|
public string | getPageMetaKeywords() Returns a non-HTML encoded string of meta keywords
|
public | setPageMetaDescription(string $meta) Sets the page meta description
|
public | setPageMetaKeywords(string $meta) Sets the page meta keywords
|
public | viewItemByID(int $id=1, bool $from_cache=false) Loads the item and display it with view.item.template.php
|
public | displayPageTitle() Outputs the page title
|
public | genericSearch($fieldname, $keyword, $fields_tobe_selected=' *', $start, $end, $sortby='', $sortdirection='ASC') |
public string | preventDuplicateValueInItemTable(string $fieldname, string $possible_duplicate, int $id) Returns a new name if there's an item with the same name in the specified $fieldname $SystemDB
|
public | itemColumnExists($fieldname) |
public null | restoreItem(int $id, int $version) Restores an item from global versioning $Versioning $SystemDB $SystemLog
|
public boolean | findDuplicateItems(array $data) Given an associative array $data, find possible duplicate from item's table
|
public bool|array String array | getValidationErrorListBeforeSaveItem(array $datavalues) Validates save item. If there's an error, it will return an array with one or more error string, otherwise it will return a boolean true $CurrentUser
|
public bool | addBeforeSaveItemValidationHook(object $object, string $function_name) Add hook to before save Item Event function
|
public bool | addAfterSaveItemFunctionHook(object $object, string $function_name) Add hook to after save Item Event function
|
public bool* | addBeforeSaveItemFunctionHook(object $object, string $function_name) Add hook to before save Item Event function
|
public array Array containing ('status','id','errors') | saveItem(int $id, $alternative_datavalues=NULL) Saves item to database. If the item field has the following field: guid, version, date_created, date_modified, date_available, it will be filled automatically cmsDatabase $SystemDB basicVersioning $Versioning
|
public int | getItemTotalFullTextSearchResultCount(string $keyword, string $fields='title, , , string $criteria='status, ) Returns the number of search result with a sepcific keyword. Default criteria is status > 0
|
public array | getItemFullTextSearchResult(string $keyword, string $criteria='', string $fields='title, , , string $start, string $end, string $sortby='', string $sortdirection='ASC') Returns an array of search result
|
public array | getSortableItemColumns() Returns a label/key pair array containing a list of sortable item fields This method replaces the obsoleted getSortableItemColumns
|
public array | getDefaultItemMetaOptionKeys() Returns an array of default item options. If it's not defined, the hardcoded property of default_item_options is returned instead
|
public array | getItemMetaOptionKeys() Returns an array containing on array of item options. The values of the options will still be evaluated as a flat list array, however it is sectioned into array with the following keys: header, value, type, and options.
Label: section title (not used for any evaluationType: checkboxgroup, dropdownlist, or none. If none, then it means there are suboptions which contain another array of thisKey: the key option. Please note that checkboxgroup doesn't have a key since the keys are in the optionsOptions: an array with 2 keys: label and key
Label: section title (not used for any evaluation
Type: checkboxgroup, dropdownlist, or none. If none, then it means there are suboptions which contain another array of this
Key: the key option. Please note that checkboxgroup doesn't have a key since the keys are in the options
Options: an array with 2 keys: label and key
|
public array | getMainpageMetaOptionKeys() Returns an array containing on array of main page options. The values of the options will still be evaluated as a flat list array, however it is sectioned into array with the following keys: header, value, type, and options.
Label: section title (not used for any evaluationType: checkboxgroup, dropdownlist, or none. If none, then it means there are suboptions which contain another array of thisKey: the key option. Please note that checkboxgroup doesn't have a key since the keys are in the optionsOptions: an array with 2 keys: label and key
Label: section title (not used for any evaluation
Type: checkboxgroup, dropdownlist, or none. If none, then it means there are suboptions which contain another array of this
Key: the key option. Please note that checkboxgroup doesn't have a key since the keys are in the options
Options: an array with 2 keys: label and key
|
public array | getDefaultMainpageMetaOptionKeys() Returns an array of default mainpage options. If it's not defined, the hardcoded property of default_mainpage_options
|
public boolean | Run(array $command) Runs command. The main key 'action' in the command array is the router
|