@@ -13,8 +13,8 @@ |
||
| 13 | 13 | class link_description extends \phpbb\textreparser\row_based_plugin |
| 14 | 14 | { |
| 15 | 15 | /** |
| 16 | - * {@inheritdoc} |
|
| 17 | - */ |
|
| 16 | + * {@inheritdoc} |
|
| 17 | + */ |
|
| 18 | 18 | public function get_columns() |
| 19 | 19 | { |
| 20 | 20 | return array( |
@@ -37,37 +37,37 @@ discard block |
||
| 37 | 37 | private $ext_name = 'ernadoo/phpbbdirectory'; |
| 38 | 38 | |
| 39 | 39 | /** |
| 40 | - * Set the extension manager |
|
| 41 | - * |
|
| 42 | - * @param \phpbb\extension\manager $phpbb_extension_manager |
|
| 43 | - * @return null |
|
| 44 | - */ |
|
| 40 | + * Set the extension manager |
|
| 41 | + * |
|
| 42 | + * @param \phpbb\extension\manager $phpbb_extension_manager |
|
| 43 | + * @return null |
|
| 44 | + */ |
|
| 45 | 45 | public function set_extension_manager(\phpbb\extension\manager $phpbb_extension_manager) |
| 46 | 46 | { |
| 47 | 47 | $this->extension_manager = $phpbb_extension_manager; |
| 48 | 48 | } |
| 49 | 49 | |
| 50 | 50 | /** |
| 51 | - * Set the path helper |
|
| 52 | - * |
|
| 53 | - * @param \phpbb\path_helper $path_helper |
|
| 54 | - * @return null |
|
| 55 | - */ |
|
| 51 | + * Set the path helper |
|
| 52 | + * |
|
| 53 | + * @param \phpbb\path_helper $path_helper |
|
| 54 | + * @return null |
|
| 55 | + */ |
|
| 56 | 56 | public function set_path_helper(\phpbb\path_helper $path_helper) |
| 57 | 57 | { |
| 58 | 58 | $this->path_helper = $path_helper; |
| 59 | 59 | } |
| 60 | 60 | |
| 61 | 61 | /** |
| 62 | - * Set the tables names |
|
| 63 | - * |
|
| 64 | - * @param string $categories_table |
|
| 65 | - * @param string $comments_table |
|
| 66 | - * @param string $links_table |
|
| 67 | - * @param string $votes_table |
|
| 68 | - * @param string $watch_table |
|
| 69 | - * @return null |
|
| 70 | - */ |
|
| 62 | + * Set the tables names |
|
| 63 | + * |
|
| 64 | + * @param string $categories_table |
|
| 65 | + * @param string $comments_table |
|
| 66 | + * @param string $links_table |
|
| 67 | + * @param string $votes_table |
|
| 68 | + * @param string $watch_table |
|
| 69 | + * @return null |
|
| 70 | + */ |
|
| 71 | 71 | public function set_tables($categories_table, $comments_table, $links_table, $votes_table, $watch_table) |
| 72 | 72 | { |
| 73 | 73 | $this->comments_table = $comments_table; |
@@ -77,48 +77,48 @@ discard block |
||
| 77 | 77 | $this->categories_table = $categories_table; |
| 78 | 78 | } |
| 79 | 79 | /** |
| 80 | - * Return ext name |
|
| 81 | - * |
|
| 82 | - * @param bool $web_root_path Whether the path should be relative to web root |
|
| 83 | - * @return string Path to an extension |
|
| 84 | - */ |
|
| 80 | + * Return ext name |
|
| 81 | + * |
|
| 82 | + * @param bool $web_root_path Whether the path should be relative to web root |
|
| 83 | + * @return string Path to an extension |
|
| 84 | + */ |
|
| 85 | 85 | public function get_ext_name($web_root_path = false) |
| 86 | 86 | { |
| 87 | 87 | return (($web_root_path) ? $this->path_helper->get_web_root_path() : '') . $this->extension_manager->get_extension_path($this->ext_name); |
| 88 | 88 | } |
| 89 | 89 | |
| 90 | 90 | /** |
| 91 | - * Return path to resource image |
|
| 92 | - * |
|
| 93 | - * @param string $type is ressource type (flags|icons) |
|
| 94 | - * @param string $image is the resource to display |
|
| 95 | - * @return string The relative path to ressource |
|
| 96 | - */ |
|
| 91 | + * Return path to resource image |
|
| 92 | + * |
|
| 93 | + * @param string $type is ressource type (flags|icons) |
|
| 94 | + * @param string $image is the resource to display |
|
| 95 | + * @return string The relative path to ressource |
|
| 96 | + */ |
|
| 97 | 97 | public function get_img_path($type, $image = '') |
| 98 | 98 | { |
| 99 | 99 | return $this->get_ext_name(true) . 'images/' . $type . '/' . $image; |
| 100 | 100 | } |
| 101 | 101 | |
| 102 | 102 | /** |
| 103 | - * Return path to banner |
|
| 104 | - * |
|
| 105 | - * @param string $banner is the physical name |
|
| 106 | - * @return string The relative path to banner |
|
| 107 | - */ |
|
| 103 | + * Return path to banner |
|
| 104 | + * |
|
| 105 | + * @param string $banner is the physical name |
|
| 106 | + * @return string The relative path to banner |
|
| 107 | + */ |
|
| 108 | 108 | public function get_banner_path($banner = '') |
| 109 | 109 | { |
| 110 | 110 | return 'files/' . $this->get_ext_name() . 'banners/' . $banner; |
| 111 | 111 | } |
| 112 | 112 | |
| 113 | 113 | /** |
| 114 | - * Return array entries that match the pattern |
|
| 115 | - * |
|
| 116 | - * @link http://php.net/manual/fr/function.preg-grep.php#95787 |
|
| 117 | - * |
|
| 118 | - * @param string $pattern The pattern to search for |
|
| 119 | - * @param array $input The input array |
|
| 120 | - * @return array $vals Returns an array indexed using the keys from the input array |
|
| 121 | - */ |
|
| 114 | + * Return array entries that match the pattern |
|
| 115 | + * |
|
| 116 | + * @link http://php.net/manual/fr/function.preg-grep.php#95787 |
|
| 117 | + * |
|
| 118 | + * @param string $pattern The pattern to search for |
|
| 119 | + * @param array $input The input array |
|
| 120 | + * @return array $vals Returns an array indexed using the keys from the input array |
|
| 121 | + */ |
|
| 122 | 122 | public function preg_grep_keys($pattern, $input) |
| 123 | 123 | { |
| 124 | 124 | $keys = preg_grep($pattern, array_keys($input)); |
@@ -44,7 +44,7 @@ discard block |
||
| 44 | 44 | */ |
| 45 | 45 | public function set_extension_manager(\phpbb\extension\manager $phpbb_extension_manager) |
| 46 | 46 | { |
| 47 | - $this->extension_manager = $phpbb_extension_manager; |
|
| 47 | + $this->extension_manager = $phpbb_extension_manager; |
|
| 48 | 48 | } |
| 49 | 49 | |
| 50 | 50 | /** |
@@ -70,11 +70,11 @@ discard block |
||
| 70 | 70 | */ |
| 71 | 71 | public function set_tables($categories_table, $comments_table, $links_table, $votes_table, $watch_table) |
| 72 | 72 | { |
| 73 | - $this->comments_table = $comments_table; |
|
| 73 | + $this->comments_table = $comments_table; |
|
| 74 | 74 | $this->links_table = $links_table; |
| 75 | 75 | $this->votes_table = $votes_table; |
| 76 | 76 | $this->watch_table = $watch_table; |
| 77 | - $this->categories_table = $categories_table; |
|
| 77 | + $this->categories_table = $categories_table; |
|
| 78 | 78 | } |
| 79 | 79 | /** |
| 80 | 80 | * Return ext name |
@@ -84,7 +84,7 @@ discard block |
||
| 84 | 84 | */ |
| 85 | 85 | public function get_ext_name($web_root_path = false) |
| 86 | 86 | { |
| 87 | - return (($web_root_path) ? $this->path_helper->get_web_root_path() : '') . $this->extension_manager->get_extension_path($this->ext_name); |
|
| 87 | + return (($web_root_path) ? $this->path_helper->get_web_root_path() : '').$this->extension_manager->get_extension_path($this->ext_name); |
|
| 88 | 88 | } |
| 89 | 89 | |
| 90 | 90 | /** |
@@ -96,7 +96,7 @@ discard block |
||
| 96 | 96 | */ |
| 97 | 97 | public function get_img_path($type, $image = '') |
| 98 | 98 | { |
| 99 | - return $this->get_ext_name(true) . 'images/' . $type . '/' . $image; |
|
| 99 | + return $this->get_ext_name(true).'images/'.$type.'/'.$image; |
|
| 100 | 100 | } |
| 101 | 101 | |
| 102 | 102 | /** |
@@ -107,7 +107,7 @@ discard block |
||
| 107 | 107 | */ |
| 108 | 108 | public function get_banner_path($banner = '') |
| 109 | 109 | { |
| 110 | - return 'files/' . $this->get_ext_name() . 'banners/' . $banner; |
|
| 110 | + return 'files/'.$this->get_ext_name().'banners/'.$banner; |
|
| 111 | 111 | } |
| 112 | 112 | |
| 113 | 113 | /** |