mirror of
https://github.com/Combodo/iTop.git
synced 2026-04-24 11:08:45 +02:00
N°2847 - ActivityPanel: Rework for new UX
- Add MetaModel::GetCaseLogs($sClass) function - Rename ActivityNewEntryForm to CaseLogEntryForm - Rework ActivityPanel and CaseLogEntryForm markup / CSS - Change for 1 CaseLogEntryForm per tab (caselogs and activity) with specific "Add entry..." choices
This commit is contained in:
@@ -1553,6 +1553,7 @@ abstract class MetaModel
|
||||
{
|
||||
$aLinkedSets = array();
|
||||
foreach (self::ListAttributeDefs($sClass) as $sAttCode => $oAtt) {
|
||||
// Note: Careful, this will only return SUB-classes, which does NOT include AttributeLinkedset itself! We might want to use "is_a()" instead.
|
||||
if (is_subclass_of($oAtt, 'AttributeLinkedSet')) {
|
||||
$aLinkedSets[$sAttCode] = $oAtt;
|
||||
}
|
||||
@@ -1600,6 +1601,27 @@ abstract class MetaModel
|
||||
}
|
||||
}
|
||||
|
||||
/** @var array Cache for caselog attributes of the classes */
|
||||
protected static $m_aCaseLogsAttributesCache = [];
|
||||
|
||||
/**
|
||||
* Return an array of attribute codes for the caselogs attributes of $sClass
|
||||
*
|
||||
* @param string $sClass
|
||||
*
|
||||
* @return array
|
||||
* @throws \CoreException
|
||||
* @since 3.0.0
|
||||
*/
|
||||
final public static function GetCaseLogs(string $sClass)
|
||||
{
|
||||
if (!isset(static::$m_aCaseLogsAttributesCache[$sClass])) {
|
||||
static::$m_aCaseLogsAttributesCache[$sClass] = self::GetAttributesList($sClass, ['AttributeCaseLog']);
|
||||
}
|
||||
|
||||
return static::$m_aCaseLogsAttributesCache[$sClass];
|
||||
}
|
||||
|
||||
/** @var array */
|
||||
protected static $m_aTrackForwardCache = array();
|
||||
|
||||
|
||||
Reference in New Issue
Block a user