@@ -16,34 +16,34 @@ |
||
16 | 16 | interface type_interface |
17 | 17 | { |
18 | 18 | /** |
19 | - * Returns the unique ID of the location. |
|
20 | - * |
|
21 | - * @return string ID of location. |
|
22 | - */ |
|
19 | + * Returns the unique ID of the location. |
|
20 | + * |
|
21 | + * @return string ID of location. |
|
22 | + */ |
|
23 | 23 | public function get_id(); |
24 | 24 | |
25 | 25 | /** |
26 | - * Returns the name of the location. |
|
27 | - * |
|
28 | - * @return string Name of location. |
|
29 | - */ |
|
26 | + * Returns the name of the location. |
|
27 | + * |
|
28 | + * @return string Name of location. |
|
29 | + */ |
|
30 | 30 | public function get_name(); |
31 | 31 | |
32 | 32 | /** |
33 | - * Returns the description of the location. |
|
34 | - * |
|
35 | - * @return string Description of location. |
|
36 | - */ |
|
33 | + * Returns the description of the location. |
|
34 | + * |
|
35 | + * @return string Description of location. |
|
36 | + */ |
|
37 | 37 | public function get_desc(); |
38 | 38 | |
39 | 39 | /** |
40 | - * Returns whether or not this location type will be displayed on a current page. |
|
41 | - * |
|
42 | - * Generally, you can always return true, but if you can narrow down the usage |
|
43 | - * without adding extra load to server, this will further enhance the extension's |
|
44 | - * performance. |
|
45 | - * |
|
46 | - * @return bool True when location type will be displayed on a current page and false if not. |
|
47 | - */ |
|
40 | + * Returns whether or not this location type will be displayed on a current page. |
|
41 | + * |
|
42 | + * Generally, you can always return true, but if you can narrow down the usage |
|
43 | + * without adding extra load to server, this will further enhance the extension's |
|
44 | + * performance. |
|
45 | + * |
|
46 | + * @return bool True when location type will be displayed on a current page and false if not. |
|
47 | + */ |
|
48 | 48 | public function will_display(); |
49 | 49 | } |
@@ -13,30 +13,30 @@ discard block |
||
13 | 13 | class manager |
14 | 14 | { |
15 | 15 | /** |
16 | - * Array that contains all available template location types which are passed |
|
17 | - * via the service container |
|
18 | - * @var array |
|
19 | - */ |
|
16 | + * Array that contains all available template location types which are passed |
|
17 | + * via the service container |
|
18 | + * @var array |
|
19 | + */ |
|
20 | 20 | protected $template_locations; |
21 | 21 | |
22 | 22 | /** |
23 | - * Construct an template locations manager object |
|
24 | - * |
|
25 | - * @param array $template_locations Template location types passed via the service container |
|
26 | - */ |
|
23 | + * Construct an template locations manager object |
|
24 | + * |
|
25 | + * @param array $template_locations Template location types passed via the service container |
|
26 | + */ |
|
27 | 27 | public function __construct($template_locations) |
28 | 28 | { |
29 | 29 | $this->register_template_locations($template_locations); |
30 | 30 | } |
31 | 31 | |
32 | 32 | /** |
33 | - * Get a list of all template location types |
|
34 | - * |
|
35 | - * Returns an associated array where key is the location id |
|
36 | - * and value is array of location name and location description. |
|
37 | - * |
|
38 | - * @return array Array containing a list of all template locations |
|
39 | - */ |
|
33 | + * Get a list of all template location types |
|
34 | + * |
|
35 | + * Returns an associated array where key is the location id |
|
36 | + * and value is array of location name and location description. |
|
37 | + * |
|
38 | + * @return array Array containing a list of all template locations |
|
39 | + */ |
|
40 | 40 | public function get_all_locations() |
41 | 41 | { |
42 | 42 | $location_types = array(); |
@@ -53,10 +53,10 @@ discard block |
||
53 | 53 | } |
54 | 54 | |
55 | 55 | /** |
56 | - * Get a list of all template location IDs for display |
|
57 | - * |
|
58 | - * @return array Array containing a list of all template location IDs |
|
59 | - */ |
|
56 | + * Get a list of all template location IDs for display |
|
57 | + * |
|
58 | + * @return array Array containing a list of all template location IDs |
|
59 | + */ |
|
60 | 60 | public function get_all_location_ids() |
61 | 61 | { |
62 | 62 | $template_locations = array(); |
@@ -73,10 +73,10 @@ discard block |
||
73 | 73 | } |
74 | 74 | |
75 | 75 | /** |
76 | - * Register template locations |
|
77 | - * |
|
78 | - * @param array $template_locations Template location types passed via the service container |
|
79 | - */ |
|
76 | + * Register template locations |
|
77 | + * |
|
78 | + * @param array $template_locations Template location types passed via the service container |
|
79 | + */ |
|
80 | 80 | protected function register_template_locations($template_locations) |
81 | 81 | { |
82 | 82 | if (!empty($template_locations)) |
@@ -13,8 +13,8 @@ |
||
13 | 13 | class above_footer extends base |
14 | 14 | { |
15 | 15 | /** |
16 | - * {@inheritDoc} |
|
17 | - */ |
|
16 | + * {@inheritDoc} |
|
17 | + */ |
|
18 | 18 | public function get_id() |
19 | 19 | { |
20 | 20 | return 'above_footer'; |
@@ -13,16 +13,16 @@ |
||
13 | 13 | class before_posts extends base |
14 | 14 | { |
15 | 15 | /** |
16 | - * {@inheritDoc} |
|
17 | - */ |
|
16 | + * {@inheritDoc} |
|
17 | + */ |
|
18 | 18 | public function get_id() |
19 | 19 | { |
20 | 20 | return 'before_posts'; |
21 | 21 | } |
22 | 22 | |
23 | 23 | /** |
24 | - * {@inheritDoc} |
|
25 | - */ |
|
24 | + * {@inheritDoc} |
|
25 | + */ |
|
26 | 26 | public function will_display() |
27 | 27 | { |
28 | 28 | return strpos($this->user->page['page_name'], 'viewtopic') !== false; |
@@ -13,8 +13,8 @@ |
||
13 | 13 | class above_header extends base |
14 | 14 | { |
15 | 15 | /** |
16 | - * {@inheritDoc} |
|
17 | - */ |
|
16 | + * {@inheritDoc} |
|
17 | + */ |
|
18 | 18 | public function get_id() |
19 | 19 | { |
20 | 20 | return 'above_header'; |
@@ -13,16 +13,16 @@ |
||
13 | 13 | class after_posts extends base |
14 | 14 | { |
15 | 15 | /** |
16 | - * {@inheritDoc} |
|
17 | - */ |
|
16 | + * {@inheritDoc} |
|
17 | + */ |
|
18 | 18 | public function get_id() |
19 | 19 | { |
20 | 20 | return 'after_posts'; |
21 | 21 | } |
22 | 22 | |
23 | 23 | /** |
24 | - * {@inheritDoc} |
|
25 | - */ |
|
24 | + * {@inheritDoc} |
|
25 | + */ |
|
26 | 26 | public function will_display() |
27 | 27 | { |
28 | 28 | return strpos($this->user->page['page_name'], 'viewtopic') !== false; |
@@ -13,8 +13,8 @@ |
||
13 | 13 | class below_header extends base |
14 | 14 | { |
15 | 15 | /** |
16 | - * {@inheritDoc} |
|
17 | - */ |
|
16 | + * {@inheritDoc} |
|
17 | + */ |
|
18 | 18 | public function get_id() |
19 | 19 | { |
20 | 20 | return 'below_header'; |
@@ -13,16 +13,16 @@ |
||
13 | 13 | class after_first_post extends base |
14 | 14 | { |
15 | 15 | /** |
16 | - * {@inheritDoc} |
|
17 | - */ |
|
16 | + * {@inheritDoc} |
|
17 | + */ |
|
18 | 18 | public function get_id() |
19 | 19 | { |
20 | 20 | return 'after_first_post'; |
21 | 21 | } |
22 | 22 | |
23 | 23 | /** |
24 | - * {@inheritDoc} |
|
25 | - */ |
|
24 | + * {@inheritDoc} |
|
25 | + */ |
|
26 | 26 | public function will_display() |
27 | 27 | { |
28 | 28 | return strpos($this->user->page['page_name'], 'viewtopic') !== false; |
@@ -13,16 +13,16 @@ |
||
13 | 13 | class after_profile extends base |
14 | 14 | { |
15 | 15 | /** |
16 | - * {@inheritDoc} |
|
17 | - */ |
|
16 | + * {@inheritDoc} |
|
17 | + */ |
|
18 | 18 | public function get_id() |
19 | 19 | { |
20 | 20 | return 'after_profile'; |
21 | 21 | } |
22 | 22 | |
23 | 23 | /** |
24 | - * {@inheritDoc} |
|
25 | - */ |
|
24 | + * {@inheritDoc} |
|
25 | + */ |
|
26 | 26 | public function will_display() |
27 | 27 | { |
28 | 28 | return strpos($this->user->page['page_name'], 'memberlist') !== false && strpos($this->user->page['query_string'], 'viewprofile') !== false; |