Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

RexStan-Überprüfung: lib/Category.php #105

Merged
merged 2 commits into from
Sep 8, 2024
Merged
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
11 changes: 5 additions & 6 deletions lib/Category.php
Original file line number Diff line number Diff line change
Expand Up @@ -23,7 +23,9 @@
*/
class Category extends rex_yform_manager_dataset
{
/** @api */
public const DRAFT = -1;
/** @api */
public const ONLINE = 1;

/**
Expand Down Expand Up @@ -80,19 +82,16 @@ public function getEntries(): rex_yform_manager_collection
* Returns the URL of the Category.
*
* @param string $profile Das Profil, das für die URL-Erstellung verwendet wird. Standardmäßig 'neues-category-id'. / The profile used for URL creation. Defaults to 'neues-category-id'.
* @return string Die URL der Kategorie oder ein leerer String, wenn keine URL gefunden wurde. / The URL of the Category or an empty string if no URL was found.
* @return string Die URL der Kategorie. / The URL of the Category.
*
* Beispiel / Example:
* $url = $category->getUrl();
*
* @api
*/
public function getUrl(string $profile = 'neues-category-id'): ?string
public function getUrl(string $profile = 'neues-category-id'): string
{
if ($url = rex_getUrl(null, null, [$profile => $this->getId()])) {
return $url;
}
return null;
return rex_getUrl(null, null, [$profile => $this->getId()]);
}

/**
Expand Down