1 | <?php |
||
12 | trait BaseEntity |
||
13 | { |
||
14 | /** |
||
15 | * @return string |
||
16 | * An entity type. |
||
17 | */ |
||
18 | abstract protected function entityType(); |
||
19 | |||
20 | /** |
||
21 | * @param string $argument1 |
||
22 | * An argument to clarify the results. |
||
23 | * @param string $argument2 |
||
24 | * An argument to clarify the results. |
||
25 | * |
||
26 | * @return int |
||
27 | * An ID of the entity. |
||
28 | */ |
||
29 | abstract public function getIdByArguments($argument1, $argument2); |
||
30 | |||
31 | /** |
||
32 | * Get identifier of current entity. |
||
33 | * |
||
34 | * @return int |
||
35 | */ |
||
36 | public function getCurrentId() |
||
43 | |||
44 | /** |
||
45 | * @param string $operation |
||
46 | * Allowable values: "edit", "view", "visit". |
||
47 | * @param string $argument1 |
||
48 | * An argument to clarify the result. |
||
49 | * @param string $argument2 |
||
50 | * An argument to clarify the result. |
||
51 | * |
||
52 | * @return string |
||
53 | * Entity URL. |
||
54 | */ |
||
55 | 4 | public function entityUrl($operation, $argument1 = '', $argument2 = '') |
|
70 | } |
||
71 |