Extensions/WordPress/Admin/AdminPage.php
private function set_config( $config )
    {
        if( !isset( $config['title'] ) )
        {
            throw new \RuntimeException( 'Missing required parameter "title" for menu' );
        }
        
        if( !isset( $config['slug'] ) || '' == $config['slug'] )
        {
            $config['slug'] = \Amarkal\Common\Tools::strtoslug( $config['title'] );
        }
        $this->config = array_merge( $this->get_defaults(), $config );
    }
private function set_config( $config )
    {
        if( !isset( $config['title'] ) )
        {
            throw new \RuntimeException( 'Missing required parameter "title" for menu' );
        }
        
        if( !isset( $config['slug'] ) || '' == $config['slug'] )
        {
            $config['slug'] = \Amarkal\Common\Tools::strtoslug( $config['title'] );
        }
        $this->config = array_merge( $this->get_defaults(), $config );
    }
private function set_config ( $ config ) { if ( ! isset ( $ config [ 'title' ] ) ) { throw new \ RuntimeException ( 'Missing required parameter "title" for menu' ) ; } if ( ! isset ( $ config [ 'slug' ] ) || '' == $ config [ 'slug' ] ) { $ config [ 'slug' ] = \ Amarkal \ Common \ Tools :: strtoslug ( $ config [ 'title' ] ) ; } $ this -> config = array_merge ( $ this -> get_defaults ( ) , $ config ) ; }
Set the configuration for this menu page.

Validates that all the required parameters have been provided.
Auto generates a slug if none was provided.

@param mixed[] $config The configuraion.
@throws \RuntimeException If one of the required options was not provided.
Set the configuration for this menu page .