SCHLIX\cmsAdmin_CategorizedList

Inherited from cmsAdmin_List
Implements interface_cmsAdmin_CategorizedList
Inherits Core_CustomField_Admin, Core_Menu_Admin, Landing_Admin, Tag_Admin, cmsAdmin_HierarchicalTree_List, cmsAdmin_PluginsManager

Protected Attributes

protected $app 
protected $tree_config 
protected $ajaxfield_categories 

Protected Methods

protected intgetCurrentCategoryIDFromCookie()
Get current category ID from cookie (when navigated)
protected resetAllCategoriesMetaOptionKeys()
Resets meta option keys for all items
protected resetAllCategoriesItemsPerPage()
Resets meta option keys for all items
protected setPreviewLinkForCategoryListingResult($categories)
protected validateUpdateCategoryField($id, $field, $value)
protected recordCurrentUserSaveCategory($id)
protected getParentIDs($cat_id)

Public Methods

public __construct($data_type=null, $public_methods=null)
public editItem(array $id)
Edit item. Returns an array ['id' => id, 'errors' => list of errors] $CurrentUser
public ajaxGetAllDataResponseSchema()
Ajax reply of all data response schema from all table
public setCategoryFieldNamesForAjaxListing()
public checkIfThisCategoryInTheMenu($cid)
public getFullPathByCategoryID($cat_id)
public arraymodifyItemResponseSchemaFields(array $response_schema)
You can customize the response schema field here
public getCategoryTableResponseSchema()
Returns the data response Schema for ajax Listing public function getItemsResponseSchema() { $listing_fields = $this->getItemFieldNamesForAjaxListing(); $table_fields = $this->app->getItemTable()->getFields(); $result_fields = $this->getParserFromTableListingFields($table_fields, $listing_fields); Add this because in the datatable the cid is also displayed $result_fields[] = array('key' => $this->app->getFieldCategoryID(), 'parser' => 'number'); $result_fields = $this->modifyItemResponseSchemaFields($result_fields); $response_result = array ( 'primary_key' => $this->app->getFieldID(), 'resultsList' => "data", 'fields' => $result_fields, 'metaFields' => array( 'totalRecords' => "totalRecords", 'recordsReturned' => "recordsReturned", 'paginationRecordOffset' => "start", 'start' => "start", 'end' => "end", 'paginationRowsPerPage' => "itemsperpage", 'sortby' => "sortby", 'sortdirection' => "sortdirection" ) ); return $response_result; ajaxReply(200, $response_result); } Returns the data response Schema for ajax Listing - category table
public getCategoryFieldNamesForAjaxListing()
public ajaxGetItemsByCategoryID($id, $start, $end, $sortby='', $sortdirection='ASC')
public typemodifyAjaxGetItemsByCategoryIDResult(type $id, type $result_array)
Modify AJAX result before returned to user
public ajaxSaveCategory($id)
public ajaxUpdateField()
public ajaxSearchObjects($keyword='', $start, $end, $sortby='', $sortdirection='ASC')
public stringajaxGetAllCategories(int $start, int $end, string $sortby='', string $sortdirection='ASC')
Returns a JSON-encoded list of all categories $SystemDB
public arraymodifyAjaxGetAllCategoriesResult(array $category_array)
Override the result of get all categories
public getCategoryByID($id)
public onAfterSaveItem(array $datavalues, $original_datavalues, $previous_item, array $retval)
Override cmsAdmin_List's after save item
public onGetAdminValidationErrorListBeforeSaveCategory(type $datavalues)
Validates $datavalues before saved and returns an error list if any, otherwise return an empty array
public arrayonModifyDataBeforeSaveCategory(array $datavalues)
Save item hook that you can override. Must return array of modified or unmodified $datavalues
public arrayonAfterSaveCategory(array $datavalues, $original_datavalues, $previous_category, array $retval)
Save item hook that you can override. Must return array of modified or unmodified $datavalues
public saveCategory($id)
public editCategory($id)
public ajaxMoveObjects($mixed_items_to_move, $destination)
public duplicateCategory($catid, $destination_catnumber)
public duplicateItem($source_item_id, $destination_catnumber)
public stringgetItemParentURLPathPreviewLink(array $item)
Generate parent URL's path
public stringgetCategoryParentURLPathPreviewLink(array $category)
Generate parent URL's path
public ajaxCopyObjects($mixed_items_to_copy, $destination='')
public arrayajaxRestoreCategory(int $cid, float $version)
Restore a category to a previous version
public arraysaveConfig(string $override_app_name='')
Save Configuration. You can override the app name if required $SystemConfig $CurrentUser
public boolRun()
Runs admin command