@@ 775-781 (lines=7) @@ | ||
772 | if ( array_key_exists( $this->_req_action, $this->_page_routes )) { |
|
773 | $this->_route = $this->_page_routes[ $this->_req_action ]; |
|
774 | $this->_route_config = isset($this->_page_config[$this->_req_action]) ? $this->_page_config[$this->_req_action] : array(); |
|
775 | } else { |
|
776 | // user error msg |
|
777 | $error_msg = sprintf( __( 'The requested page route does not exist for the %s admin page.', 'event_espresso' ), $this->_admin_page_title ); |
|
778 | // developer error msg |
|
779 | $error_msg .= '||' . $error_msg . sprintf( __( ' Create a key in the "_page_routes" array named "%s" and set its value to the appropriate method.', 'event_espresso' ), $this->_req_action ); |
|
780 | throw new EE_Error( $error_msg ); |
|
781 | } |
|
782 | ||
783 | // and that a default route exists |
|
784 | if ( ! array_key_exists( 'default', $this->_page_routes )) { |
|
@@ 818-824 (lines=7) @@ | ||
815 | protected function _verify_route( $route ) { |
|
816 | if ( array_key_exists( $this->_req_action, $this->_page_routes )) { |
|
817 | return true; |
|
818 | } else { |
|
819 | // user error msg |
|
820 | $error_msg = sprintf( __( 'The given page route does not exist for the %s admin page.', 'event_espresso' ), $this->_admin_page_title ); |
|
821 | // developer error msg |
|
822 | $error_msg .= '||' . $error_msg . sprintf( __( ' Check the route you are using in your method (%s) and make sure it matches a route set in your "_page_routes" array property', 'event_espresso' ), $route ); |
|
823 | throw new EE_Error( $error_msg ); |
|
824 | } |
|
825 | } |
|
826 | ||
827 |