Customize whether move object lists are lmited to (grand)parents
This commit is contained in:
committed by
Alexander Nicolaysen Sørnes
parent
968569b3fa
commit
fc9bcb4927
@@ -923,9 +923,18 @@ class ObjectManager
|
|||||||
"color4");
|
"color4");
|
||||||
|
|
||||||
$oParent = $oObject->objectGetParent();
|
$oParent = $oObject->objectGetParent();
|
||||||
$oGrandFather = $oParent->objectGetParent();
|
|
||||||
|
|
||||||
if($oGrandFather)
|
if(method_exists($oParent, 'objectGetParent'))
|
||||||
|
{
|
||||||
|
$oGrandFather = $oParent->objectGetParent();
|
||||||
|
$oParentOM = new objectManager(get_class($oParent), '', $oParent->objectGetId());
|
||||||
|
} else
|
||||||
|
{
|
||||||
|
$oGrandFather = null;
|
||||||
|
$oParentOM = null;
|
||||||
|
}
|
||||||
|
|
||||||
|
if($oGrandFather && $oParentOM->GetOptionalSetting('objectRestrictMoveObjectListsToParents', false))
|
||||||
{
|
{
|
||||||
$aParentSiblings = $oGrandFather->objectGetChildrenClassSpecific(get_class($oParent));
|
$aParentSiblings = $oGrandFather->objectGetChildrenClassSpecific(get_class($oParent));
|
||||||
|
|
||||||
@@ -997,7 +1006,7 @@ class ObjectManager
|
|||||||
"Move here"),
|
"Move here"),
|
||||||
"color4");
|
"color4");
|
||||||
|
|
||||||
if(method_exists($oObject, 'objectGetParent'))
|
if($this->GetOptionalSetting('objectRestrictMoveObjectListsToParents', false))
|
||||||
{
|
{
|
||||||
$oParent = $oObject->objectGetParent();
|
$oParent = $oObject->objectGetParent();
|
||||||
|
|
||||||
|
|||||||
@@ -1429,6 +1429,12 @@ class testData{
|
|||||||
return new version($this->iVersionId);
|
return new version($this->iVersionId);
|
||||||
}
|
}
|
||||||
|
|
||||||
|
/* Only show children of (grand)parents in the Move Child Objects and Change Parent lists */
|
||||||
|
public static function objectRestrictMoveObjectListsToParents()
|
||||||
|
{
|
||||||
|
return true;
|
||||||
|
}
|
||||||
|
|
||||||
function objectGetChildren($bIncludeDeleted = false)
|
function objectGetChildren($bIncludeDeleted = false)
|
||||||
{
|
{
|
||||||
/* We have none */
|
/* We have none */
|
||||||
|
|||||||
@@ -789,6 +789,12 @@ class version {
|
|||||||
return new application($this->iAppId);
|
return new application($this->iAppId);
|
||||||
}
|
}
|
||||||
|
|
||||||
|
/* Only show children of (grand)parents in the Move Child Objects and Change Parent lists */
|
||||||
|
public static function objectRestrictMoveObjectListsToParents()
|
||||||
|
{
|
||||||
|
return true;
|
||||||
|
}
|
||||||
|
|
||||||
public function getRatingInfo()
|
public function getRatingInfo()
|
||||||
{
|
{
|
||||||
return testData::getRatingInfoForVersionId($this->iVersionId);
|
return testData::getRatingInfoForVersionId($this->iVersionId);
|
||||||
|
|||||||
Reference in New Issue
Block a user