mirror of
https://gitlab.com/Chill-Projet/chill-bundles.git
synced 2025-09-03 21:34:59 +00:00
Feature: [admin][ActivityReason] improve administration for activity reason
* list alphabetically; * show "active" in index
This commit is contained in:
@@ -63,10 +63,8 @@ class ActivityReason
|
||||
|
||||
/**
|
||||
* Get category.
|
||||
*
|
||||
* @return ActivityReasonCategory
|
||||
*/
|
||||
public function getCategory()
|
||||
public function getCategory(): ?ActivityReasonCategory
|
||||
{
|
||||
return $this->category;
|
||||
}
|
||||
@@ -107,6 +105,11 @@ class ActivityReason
|
||||
return $this->name;
|
||||
}
|
||||
|
||||
public function isActiveAndParentActive(): bool
|
||||
{
|
||||
return $this->active && null !== $this->getCategory() && $this->getCategory()->getActive();
|
||||
}
|
||||
|
||||
/**
|
||||
* Set active.
|
||||
*
|
||||
|
Reference in New Issue
Block a user