$printers_department = $general_department->newSubdepartment("Printers (example)")->create(); print 'Created: ' . $printers_department; /** * Create some livechat department: * title: Urgent problems (example) * type: public * module: livechat */ $livechat_department = kyDepartment::createNew("Urgent problems (example)", kyDepartment::TYPE_PUBLIC, kyDepartment::MODULE_LIVECHAT)->create(); print 'Created: ' . $livechat_department; /** * Create a staff group: * title: Lazy guys (example) * isadmin: false (default) */ $lazy_staff_group = kyStaffGroup::createNew("Lazy guys (example)")->create(); print 'Created: ' . $lazy_staff_group; /** * Create a staff user in just created staff group: * firstname: John * lastname: Doe * username: lazyguy * email: john.doe@lazycorp.com * password: veryhardpassword */ $staff_user = $lazy_staff_group->newStaff("John", "Doe", "lazyguy", "*****@*****.**", "veryhardpassword")->setDesignation("useless specialist")->setSignature("Sorry I couldn't help you")->create(); print 'Created: ' . $staff_user; /** * Update staff user mobile number. */ $staff_user->setMobileNumber("427 078 528")->update();