aboutsummaryrefslogtreecommitdiff
path: root/lib/models/HelpContent.class.php
diff options
context:
space:
mode:
authorJan-Hendrik Willms <tleilax+studip@gmail.com>2022-05-11 08:30:37 +0000
committerJan-Hendrik Willms <tleilax+studip@gmail.com>2022-05-11 08:30:37 +0000
commit5866bdf1497623253096c1e39fb8d853c1438634 (patch)
tree1c29411180742245ddb0974385170d83011181e2 /lib/models/HelpContent.class.php
parent04b5e6ec7ca39031f0c50289fb2892d2dc0934c1 (diff)
unify class definition in relations of simpleormap models, fixes #979
Closes #979 Merge request studip/studip!564
Diffstat (limited to 'lib/models/HelpContent.class.php')
-rw-r--r--lib/models/HelpContent.class.php40
1 files changed, 20 insertions, 20 deletions
diff --git a/lib/models/HelpContent.class.php b/lib/models/HelpContent.class.php
index ccac2a2..a767859 100644
--- a/lib/models/HelpContent.class.php
+++ b/lib/models/HelpContent.class.php
@@ -44,11 +44,23 @@
* @property string mkdate database column
* @property string chdate database column
*/
-class HelpContent extends SimpleORMap {
-
+class HelpContent extends SimpleORMap
+{
+ /**
+ * configure SORM
+ *
+ * @param array $config configuration
+ */
+ protected static function configure($config = [])
+ {
+ $config['db_table'] = 'help_content';
+
+ parent::configure($config);
+ }
+
/**
* fetches set of content from database for given route
- *
+ *
* @param string $route route for help content
* @param string $language language
* @return array set of help content
@@ -74,7 +86,7 @@ class HelpContent extends SimpleORMap {
/**
* fetches content for given content_id
- *
+ *
* @param string $id id of help content
* @return array help content object
*/
@@ -91,7 +103,7 @@ class HelpContent extends SimpleORMap {
/**
* fetches set of help content from database filtered by parameters
- *
+ *
* @param string $term search term for content
* @param boolean $as_objects include HelpContent objects in result array
* @return array set of help content
@@ -100,7 +112,7 @@ class HelpContent extends SimpleORMap {
{
$params = [];
$condition = '';
- if (mb_strlen(trim($term)) >= 3) {
+ if (mb_strlen(trim($term)) >= 3) {
$condition = "WHERE content LIKE CONCAT('%', ?, '%')";
$params[] = $term;
}
@@ -116,7 +128,7 @@ class HelpContent extends SimpleORMap {
/**
* fetches help content conflicts
- *
+ *
* @return array set of help content
*/
public static function GetConflicts()
@@ -146,7 +158,7 @@ class HelpContent extends SimpleORMap {
/**
* builds help content objects for given set of content data
- *
+ *
* @param array $content_result content set
* @return array set of content objects
*/
@@ -162,16 +174,4 @@ class HelpContent extends SimpleORMap {
}
return $objects;
}
-
- /**
- * configure SORM
- *
- * @param array $config configuration
- */
- protected static function configure($config = [])
- {
- $config['db_table'] = 'help_content';
-
- parent::configure($config);
- }
}