'perm', 'ItemClass' => Array('class'=>'kDBItem','file'=>'','build_event'=>'OnItemBuild'), 'ListClass' => Array('class'=>'kDBList','file'=>'','build_event'=>'OnListBuild'), 'EventHandlerClass' => Array('class'=>'PermissionsEventHandler','file'=>'permissions_event_handler.php','build_event'=>'OnBuild'), 'TagProcessorClass' => Array('class'=>'PermissionsTagProcessor','file'=>'permissions_tag_processor.php','build_event'=>'OnBuild'), 'AutoLoad' => true, 'Clones' => Array( 'c-perm' => Array( 'Constrain' => 'Type = 0', // non-system 'ParentPrefix' => 'c', 'ForeignKey' => 'CatId', 'ParentTableKey' => 'CategoryId', 'Hooks' => Array( Array( 'Mode' => hAFTER, 'Conditional' => true, 'HookToPrefix' => '#PARENT#', 'HookToSpecial' => '*', 'HookToEvent' => Array('OnPreSave'), 'DoPrefix' => '', 'DoSpecial' => '*', 'DoEvent' => 'OnCategorySavePermissions', ), ), ), 'g-perm' => Array( 'Constrain' => 'Type = 1', // system 'ParentPrefix' => 'g', 'ForeignKey' => 'GroupId', 'ParentTableKey' => 'GroupId', 'Hooks' => Array( Array( 'Mode' => hAFTER, 'Conditional' => true, 'HookToPrefix' => '#PARENT#', 'HookToSpecial' => '*', 'HookToEvent' => Array('OnPreSave'), 'DoPrefix' => '', 'DoSpecial' => '*', 'DoEvent' => 'OnGroupSavePermissions', ), ), ), ), 'QueryString' => Array( 1 => 'id', 2 => 'Page', 3 => 'PerPage', 4 => 'event', ), 'IDField' => 'PermissionId', 'StatusField' => Array('PermissionValue'), 'TitleField' => 'Permission', 'TableName' => TABLE_PREFIX.'Permissions', 'AutoDelete' => false, 'AutoClone' => false, 'ListSQLs' => Array('' => 'SELECT %1$s.* %2$s FROM %1$s'), 'ItemSQLs' => Array('' => 'SELECT %1$s.* %2$s FROM %1$s'), 'ListSortings' => Array( '' => Array( 'Sorting' => Array('Permission' => 'asc'), ) ), 'Fields' => Array( 'PermissionId' => Array('type' => 'int', 'not_null' => 1, 'default' => 0), 'Permission' => Array('type' => 'string','not_null' => '1','default' => ''), 'GroupId' => Array('type' => 'int','default' => 0), 'PermissionValue' => Array('type' => 'int','not_null' => 1,'default' => 0), 'Type' => Array('type' => 'int','not_null' => 1,'default' => 0), 'CatId' => Array('type' => 'int','not_null' => 1,'default' => 0), ), );