| @@ 539-556 (lines=18) @@ | ||
| 536 | * |
|
| 537 | * @return mixed |
|
| 538 | */ |
|
| 539 | public function createGroup( $name, $description = '' ) |
|
| 540 | { |
|
| 541 | $data = [ |
|
| 542 | 'name' => $name, |
|
| 543 | 'description' => $description |
|
| 544 | ]; |
|
| 545 | ||
| 546 | $id = $this->groupModel->insert( $data ); |
|
| 547 | ||
| 548 | if ( is_numeric( $id ) ) |
|
| 549 | { |
|
| 550 | return (int) $id; |
|
| 551 | } |
|
| 552 | ||
| 553 | $this->error = $this->groupModel->error(); |
|
| 554 | ||
| 555 | return FALSE; |
|
| 556 | } |
|
| 557 | ||
| 558 | //-------------------------------------------------------------------- |
|
| 559 | ||
| @@ 685-702 (lines=18) @@ | ||
| 682 | * |
|
| 683 | * @return mixed |
|
| 684 | */ |
|
| 685 | public function createPermission( $name, $description = '' ) |
|
| 686 | { |
|
| 687 | $data = [ |
|
| 688 | 'name' => $name, |
|
| 689 | 'description' => $description |
|
| 690 | ]; |
|
| 691 | ||
| 692 | $id = $this->permissionModel->insert( $data ); |
|
| 693 | ||
| 694 | if ( is_numeric( $id ) ) |
|
| 695 | { |
|
| 696 | return (int) $id; |
|
| 697 | } |
|
| 698 | ||
| 699 | $this->error = $this->permissionModel->error(); |
|
| 700 | ||
| 701 | return FALSE; |
|
| 702 | } |
|
| 703 | ||
| 704 | //-------------------------------------------------------------------- |
|
| 705 | ||