public function getAdminPageBaseQuery($tab, $page)
    {
        if (!isset($this->tabs[$tab])) {
            throw new \RuntimeException("content admin tab '%s' does not exist", $tab);
        }
        if (!isset($this->adminPages[$page])) {
            throw new \RuntimeException("content admin page '%s' does not exist", $page);
        }

        if (isset($this->adminPages[$page]['base_query'])) {
            $baseQuery = $this->adminPages[$page]['base_query'];
        } else {
            $baseQuery = [];
        }

        switch ($tab) {

            case 'content':
                $baseQuery['type'] = $this->getContentTypes();
                break;

            case 'media':
                $baseQuery['type'] = $this->getMediaTypes();
                break;

            default:
                throw new \RuntimeException("only 'content' and 'media' tabs are supported as of now", $page);
        }

        return $baseQuery;
    }
public function getAdminPageBaseQuery($tab, $page)
    {
        if (!isset($this->tabs[$tab])) {
            throw new \RuntimeException("content admin tab '%s' does not exist", $tab);
        }
        if (!isset($this->adminPages[$page])) {
            throw new \RuntimeException("content admin page '%s' does not exist", $page);
        }

        if (isset($this->adminPages[$page]['base_query'])) {
            $baseQuery = $this->adminPages[$page]['base_query'];
        } else {
            $baseQuery = [];
        }

        switch ($tab) {

            case 'content':
                $baseQuery['type'] = $this->getContentTypes();
                break;

            case 'media':
                $baseQuery['type'] = $this->getMediaTypes();
                break;

            default:
                throw new \RuntimeException("only 'content' and 'media' tabs are supported as of now", $page);
        }

        return $baseQuery;
    }
public function getAdminPageBaseQuery ( $ tab , $ page ) { if ( ! isset ( $ this -> tabs [ $ tab ] ) ) { throw new \ RuntimeException ( "content admin tab '%s' does not exist" , $ tab ) ; } if ( ! isset ( $ this -> adminPages [ $ page ] ) ) { throw new \ RuntimeException ( "content admin page '%s' does not exist" , $ page ) ; } if ( isset ( $ this -> adminPages [ $ page ] [ 'base_query' ] ) ) { $ baseQuery = $ this -> adminPages [ $ page ] [ 'base_query' ] ; } else { $ baseQuery = [ ] ; } switch ( $ tab ) { case 'content' : $ baseQuery [ 'type' ] = $ this -> getContentTypes ( ) ; break ; case 'media' : $ baseQuery [ 'type' ] = $ this -> getMediaTypes ( ) ; break ; default : throw new \ RuntimeException ( "only 'content' and 'media' tabs are supported as of now" , $ page ) ; } return $ baseQuery ; }
Get admin page base query

@return array
Get admin page base query