Jarves\Controller\Admin\BackendController::getChildMenus PHP Метод

getChildMenus() защищенный Метод

protected getChildMenus ( string $code, string $value ) : array
$code string
$value string
Результат array
    protected function getChildMenus($code, $value)
    {
        $links = array();
        foreach ($value['children'] as $key => $value2) {
            if ($value2['children']) {
                $childs = $this->getChildMenus($code . "/{$key}", $value2);
                if (count($childs) == 0) {
                    //if ($this->jarves->checkUrlAccess($code . "/$key")) {
                    unset($value2['children']);
                    $links[$key] = $value2;
                    //}
                } else {
                    $value2['children'] = $childs;
                    $links[$key] = $value2;
                }
            } else {
                //if ($this->jarves->checkUrlAccess($code . "/$key")) {
                $links[$key] = $value2;
                //}
            }
            if (!$links[$key]['type'] && !$links[$key]['children'] || $links[$key]['isLink'] === false) {
                unset($links[$key][$key]);
            }
        }
        return $links;
    }