/test/VisualTest/Backoffice/RenderAllUiBlocks.php#title-panels to see live examples */ class NavigationUIBlockFactory extends AbstractUIBlockFactory { /** @inheritDoc */ public const TWIG_TAG_NAME = 'UINavigation'; /** @inheritDoc */ public const UI_BLOCK_CLASS_NAME = Navigation::class; /** * Make a basis Panel component * * @api * @param string $sTitle * @param string|null $sSubTitle * * @return \Combodo\iTop\Application\UI\Base\Component\Panel\Panel */ public static function MakeStandard($oObject, string $sFilter, array $aList = [], string $sBackUrl = '', $sPostedFieldsForBackUrl = "") { if ($sFilter != null && count($aList) === 0) { $oFilter = DBObjectSearch::FromOQL($sFilter); $oSet = new DBObjectSet($oFilter); $aList = $oSet->GetColumnAsArray('id', false); } if (count($aList) === 0) { return null; } $iIdx = array_search($oObject->GetKey(), $aList); $oNavigationBlock = new Navigation(get_class($oObject), $iIdx, $aList, $sFilter, $sBackUrl, $sPostedFieldsForBackUrl); return $oNavigationBlock; } }