SCHLIX\cmsAdmin_CategorizedList
Inherited from cmsAdmin_List
Implements interface_cmsAdmin_CategorizedList
Inherits Core_CustomField_Admin, , Landing_Admin, Tag_Admin, cmsAdmin_HierarchicalTree_List, cmsAdmin_PluginsManager
Implements interface_cmsAdmin_CategorizedList
Inherits Core_CustomField_Admin, , Landing_Admin, Tag_Admin, cmsAdmin_HierarchicalTree_List, cmsAdmin_PluginsManager
Protected Attributes
protected | $app | |
protected | $tree_config | |
protected | $ajaxfield_categories |
Protected Methods
protected int | getCurrentCategoryIDFromCookie() 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 array | modifyItemResponseSchemaFields(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 type | modifyAjaxGetItemsByCategoryIDResult(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 string | ajaxGetAllCategories(int $start, int $end, string $sortby='', string $sortdirection='ASC') Returns a JSON-encoded list of all categories $SystemDB
|
public array | modifyAjaxGetAllCategoriesResult(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 array | onModifyDataBeforeSaveCategory(array $datavalues) Save item hook that you can override. Must return array of modified or unmodified $datavalues
|
public array | onAfterSaveCategory(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 string | getItemParentURLPathPreviewLink(array $item) Generate parent URL's path
|
public string | getCategoryParentURLPathPreviewLink(array $category) Generate parent URL's path
|
public | ajaxCopyObjects($mixed_items_to_copy, $destination='') |
public array | ajaxRestoreCategory(int $cid, float $version) Restore a category to a previous version
|
public array | saveConfig(string $override_app_name='') Save Configuration. You can override the app name if required $SystemConfig $CurrentUser
|
public bool | Run() Runs admin command
|