private function addContentType(MenuEntry $contentRoot, $contentTypeKey, Bag $contentType)
    {
        $icon = $contentType->get('singleton') ? $contentType->get('icon_one') : $contentType->get('icon_many');

        // Named ContentType root
        $contentTypeEntry = $contentRoot->add(
            MenuEntry::create($contentTypeKey)
                ->setRoute('overview', ['contenttypeslug' => $contentTypeKey])
                ->setLabel($contentType->get('name'))
                ->setIcon($icon)
                ->setPermission('contenttype:' . $contentTypeKey)
        );
        // View
        $contentTypeEntry->add(
            MenuEntry::create('view')
                ->setRoute('overview', ['contenttypeslug' => $contentTypeKey])
                ->setLabel(Trans::__('contenttypes.generic.view', ['%contenttypes%' => $contentType->get('name')]))
                ->setIcon($contentType->get('icon_many', 'fa:files-o'))
                ->setPermission('contenttype:' . $contentTypeKey)
        );
        // New
        $contentTypeEntry->add(
            MenuEntry::create('new')
                ->setRoute('editcontent', ['contenttypeslug' => $contentTypeKey])
                ->setLabel(Trans::__('contenttypes.generic.new', ['%contenttype%' => $contentType->get('singular_name')]))
                ->setIcon('fa:plus')
                ->setPermission('contenttype:' . $contentTypeKey . ':create')
        );
    }
private function addContentType(MenuEntry $contentRoot, $contentTypeKey, Bag $contentType)
    {
        $icon = $contentType->get('singleton') ? $contentType->get('icon_one') : $contentType->get('icon_many');

        // Named ContentType root
        $contentTypeEntry = $contentRoot->add(
            MenuEntry::create($contentTypeKey)
                ->setRoute('overview', ['contenttypeslug' => $contentTypeKey])
                ->setLabel($contentType->get('name'))
                ->setIcon($icon)
                ->setPermission('contenttype:' . $contentTypeKey)
        );
        // View
        $contentTypeEntry->add(
            MenuEntry::create('view')
                ->setRoute('overview', ['contenttypeslug' => $contentTypeKey])
                ->setLabel(Trans::__('contenttypes.generic.view', ['%contenttypes%' => $contentType->get('name')]))
                ->setIcon($contentType->get('icon_many', 'fa:files-o'))
                ->setPermission('contenttype:' . $contentTypeKey)
        );
        // New
        $contentTypeEntry->add(
            MenuEntry::create('new')
                ->setRoute('editcontent', ['contenttypeslug' => $contentTypeKey])
                ->setLabel(Trans::__('contenttypes.generic.new', ['%contenttype%' => $contentType->get('singular_name')]))
                ->setIcon('fa:plus')
                ->setPermission('contenttype:' . $contentTypeKey . ':create')
        );
    }
private function addContentType ( MenuEntry $ contentRoot , $ contentTypeKey , Bag $ contentType ) { $ icon = $ contentType -> get ( 'singleton' ) ? $ contentType -> get ( 'icon_one' ) : $ contentType -> get ( 'icon_many' ) ; // Named ContentType root $ contentTypeEntry = $ contentRoot -> add ( MenuEntry :: create ( $ contentTypeKey ) -> setRoute ( 'overview' , [ 'contenttypeslug' => $ contentTypeKey ] ) -> setLabel ( $ contentType -> get ( 'name' ) ) -> setIcon ( $ icon ) -> setPermission ( 'contenttype:' . $ contentTypeKey ) ) ; // View $ contentTypeEntry -> add ( MenuEntry :: create ( 'view' ) -> setRoute ( 'overview' , [ 'contenttypeslug' => $ contentTypeKey ] ) -> setLabel ( Trans :: __ ( 'contenttypes.generic.view' , [ '%contenttypes%' => $ contentType -> get ( 'name' ) ] ) ) -> setIcon ( $ contentType -> get ( 'icon_many' , 'fa:files-o' ) ) -> setPermission ( 'contenttype:' . $ contentTypeKey ) ) ; // New $ contentTypeEntry -> add ( MenuEntry :: create ( 'new' ) -> setRoute ( 'editcontent' , [ 'contenttypeslug' => $ contentTypeKey ] ) -> setLabel ( Trans :: __ ( 'contenttypes.generic.new' , [ '%contenttype%' => $ contentType -> get ( 'singular_name' ) ] ) ) -> setIcon ( 'fa:plus' ) -> setPermission ( 'contenttype:' . $ contentTypeKey . ':create' ) ) ; }
Add a ContentType's menu and sub-menu.

@param MenuEntry $contentRoot
@param string    $contentTypeKey
@param Bag       $contentType
Add a ContentType s menu and sub - menu .