File tree Expand file tree Collapse file tree 1 file changed +25
-0
lines changed Expand file tree Collapse file tree 1 file changed +25
-0
lines changed Original file line number Diff line number Diff line change
1
+ <?php
2
+
3
+ namespace TgUtils ;
4
+
5
+ /** Helpers to construct URLs from objects */
6
+ interface LinkBuilder {
7
+
8
+ public const LIST = 'list ' ;
9
+ public const VIEW = 'view ' ;
10
+ public const CREATE = 'create ' ;
11
+ public const EDIT = 'edit ' ;
12
+ public const DELETE = 'delete ' ;
13
+ public const COPY = 'copy ' ;
14
+
15
+ /**
16
+ * Constructs and returns the link.
17
+ * @param mixed $subject - the subject of the link (an object or method or string or anything)
18
+ * @param string $action - the action that the link will fulfill with the subject
19
+ * @param array $params - parameters, either for the link construction process or the GET parameters in the link
20
+ * @return string - the link constructed, targeting the subject with the action and optional parameters.
21
+ */
22
+ public function getLink ($ subject , $ action = self ::VIEW , $ params = NULL );
23
+
24
+ }
25
+
You can’t perform that action at this time.
0 commit comments