|
@@ 772-778 (lines=7) @@
|
| 769 |
|
if ( array_key_exists( $this->_req_action, $this->_page_routes )) { |
| 770 |
|
$this->_route = $this->_page_routes[ $this->_req_action ]; |
| 771 |
|
$this->_route_config = isset($this->_page_config[$this->_req_action]) ? $this->_page_config[$this->_req_action] : array(); |
| 772 |
|
} else { |
| 773 |
|
// user error msg |
| 774 |
|
$error_msg = sprintf( __( 'The requested page route does not exist for the %s admin page.', 'event_espresso' ), $this->_admin_page_title ); |
| 775 |
|
// developer error msg |
| 776 |
|
$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 ); |
| 777 |
|
throw new EE_Error( $error_msg ); |
| 778 |
|
} |
| 779 |
|
|
| 780 |
|
// and that a default route exists |
| 781 |
|
if ( ! array_key_exists( 'default', $this->_page_routes )) { |
|
@@ 815-821 (lines=7) @@
|
| 812 |
|
protected function _verify_route( $route ) { |
| 813 |
|
if ( array_key_exists( $this->_req_action, $this->_page_routes )) { |
| 814 |
|
return true; |
| 815 |
|
} else { |
| 816 |
|
// user error msg |
| 817 |
|
$error_msg = sprintf( __( 'The given page route does not exist for the %s admin page.', 'event_espresso' ), $this->_admin_page_title ); |
| 818 |
|
// developer error msg |
| 819 |
|
$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 ); |
| 820 |
|
throw new EE_Error( $error_msg ); |
| 821 |
|
} |
| 822 |
|
} |
| 823 |
|
|
| 824 |
|
|