Skip to content
This repository was archived by the owner on Sep 26, 2019. It is now read-only.

Commit 8f4f979

Browse files
author
Felix Arntz
committed
Introduce Admin_Page interface.
1 parent 3d1549c commit 8f4f979

1 file changed

Lines changed: 67 additions & 0 deletions

File tree

‎src/Admin_Page.php‎

Lines changed: 67 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,67 @@
1+
<?php
2+
/**
3+
* Admin_Page interface
4+
*
5+
* @package Leaves_And_Love\OOP_Admin_Pages
6+
* @since 1.0.0
7+
*/
8+
9+
namespace Leaves_And_Love\OOP_Admin_Pages;
10+
11+
/**
12+
* Interface representing an admin page.
13+
*
14+
* @since 1.0.0
15+
*/
16+
interface Admin_Page {
17+
18+
/**
19+
* Gets the slug of the admin page.
20+
*
21+
* @since 1.0.0
22+
*
23+
* @return string Admin page slug.
24+
*/
25+
public function get_slug() : string;
26+
27+
/**
28+
* Gets the title of the admin page.
29+
*
30+
* @since 1.0.0
31+
*
32+
* @return string Admin page title.
33+
*/
34+
public function get_title() : string;
35+
36+
/**
37+
* Gets the URL of the admin page.
38+
*
39+
* @since 1.0.0
40+
*
41+
* @return string Admin page URL.
42+
*/
43+
public function get_url() : string;
44+
45+
/**
46+
* Registers the admin page within the environment.
47+
*
48+
* @since 1.0.0
49+
*/
50+
public function register();
51+
52+
/**
53+
* Initializes the admin page on pageload.
54+
*
55+
* This method must be called before any output is printed.
56+
*
57+
* @since 1.0.0
58+
*/
59+
public function initialize();
60+
61+
/**
62+
* Renders the admin page content.
63+
*
64+
* @since 1.0.0
65+
*/
66+
public function render();
67+
}

0 commit comments

Comments
 (0)