public function actionDataPermissionTree()
    {
        $data = [];
        // collect data
        foreach (NavContainer::find()->with('navs')->all() as $container) {
            $this->getItems($container);

            $data['containers'][] = [
                'containerInfo' => $container,
                'items' => isset(self::$_permissionItemData[$container->id]) ? self::$_permissionItemData[$container->id] : [],
            ];
        }
        // collect group informations
        foreach ($this->getGroups() as $group) {
            $data['groups'][] = [
                'name' => $group->name,
                'id' => $group->id,
                'fullPermission' => $this->groupHasFullPermission($group),
            ];
        }
        // return array with full data
        return $data;
    }
public function actionDataPermissionTree()
    {
        $data = [];
        // collect data
        foreach (NavContainer::find()->with('navs')->all() as $container) {
            $this->getItems($container);

            $data['containers'][] = [
                'containerInfo' => $container,
                'items' => isset(self::$_permissionItemData[$container->id]) ? self::$_permissionItemData[$container->id] : [],
            ];
        }
        // collect group informations
        foreach ($this->getGroups() as $group) {
            $data['groups'][] = [
                'name' => $group->name,
                'id' => $group->id,
                'fullPermission' => $this->groupHasFullPermission($group),
            ];
        }
        // return array with full data
        return $data;
    }
public function actionDataPermissionTree ( ) { $ data = [ ] ; // collect data foreach ( NavContainer :: find ( ) -> with ( 'navs' ) -> all ( ) as $ container ) { $ this -> getItems ( $ container ) ; $ data [ 'containers' ] [ ] = [ 'containerInfo' => $ container , 'items' => isset ( self :: $ _permissionItemData [ $ container -> id ] ) ? self :: $ _permissionItemData [ $ container -> id ] : [ ] , ] ; } // collect group informations foreach ( $ this -> getGroups ( ) as $ group ) { $ data [ 'groups' ] [ ] = [ 'name' => $ group -> name , 'id' => $ group -> id , 'fullPermission' => $ this -> groupHasFullPermission ( $ group ) , ] ; } // return array with full data return $ data ; }
Returns the full tree with groups, pages, is_inherit or not, does have rights or not as it was to hard to
implement this features directly with angular, now we just prepare anything withing php and delivers to angular only to display the data.

@return array
Returns the full tree with groups pages is_inherit or not does have rights or not as it was to hard to implement this features directly with angular now we just prepare anything withing php and delivers to angular only to display the data .