Prepare a list of the icons main menu by adding a drop-down
element for sub-menu item.

@param array &$iconList Array list of icons for main menu.
@return void
@see ViewExtensionHelper::_getActiveMenuPattern()
333980
protected function _prepareIconList(array &$iconList) {
		if (empty($iconList) || !is_array($iconList)) {
			return;
		}

		foreach ($iconList as $i => &$iconListItem) {
			if (is_array($iconListItem) && isAssoc($iconListItem)) {
				foreach ($iconListItem as $topMenu => $subMenu) {
					$subMenuList = '';
					foreach ($subMenu as $subMenuItem) {
						$subMenuClass = null;
						if ($subMenuItem === 'divider') {
							$subMenuItem = '';
							$subMenuClass = 'divider';
						}
						$subMenuList .= $this->Html->tag('li', $subMenuItem, ['class' => $subMenuClass]);
					}
					$topMenuItem = $topMenu . $this->Html->tag('ul', $subMenuList, ['class' => 'dropdown-menu']);
				}
				$iconListItem = $topMenuItem;
			}
		}
	}
1266535
public void setSelectedMenuItems(final List<? extends MenuItemSelectable> selectedItems) {
		MenuModel model = getOrCreateComponentModel();
		if (selectedItems == null || selectedItems.isEmpty()) {
			model.selectedMenuItems = null;
		} else {
			List<MenuItemSelectable> items = new ArrayList<>();
			for (MenuItemSelectable item : selectedItems) {
				if (item.isSelectAllowed()) {
					items.add(item);
				}
			}
			if (items.isEmpty()) {
				model.selectedMenuItems = null;
			} else {
				model.selectedMenuItems = items;
			}
		}
	}
919076
protected function set_active_styles() {

		$style = '.' . $this->id() . ' .dashicons.dashicons-plus-alt{ color: ' . $this->base_color() . ' !important;}';
		$style .= '.' . $this->id() . ' .column-handle{background-color: ' . $this->base_color() . ' !important;}';
		$style .= '.' . $this->id() . ' .uix-component-toolbar{background-color: ' . $this->base_color() . ' !important;}';
		$style .= '.' . $this->id() . '.processing:after {background: url(' . $this->url . 'assets/svg/loading.php?base_color=' . urlencode( str_replace( '#', '', $this->base_color() ) ) . ') no-repeat center center;}';

		uix_share()->set_active_styles( $style );

	}
450853
protected function _getActiveMenuPatterns($urlInfo = null) {
		$deepLevelsActivePattern = $this->_getDeepLevelsActiveMenuPattern();
		$activePatterns = [];
		for ($activePatternLevel = 0; $activePatternLevel <= $deepLevelsActivePattern; $activePatternLevel++) {
			$activePatterns[] = $this->_getActiveMenuPattern($activePatternLevel, $urlInfo);
		}

		return $activePatterns;
	}
1077073
protected function formatDataList(DataList $dataList)
    {
        $formattedDataListMap = array();

        foreach ($dataList as $dataObject) {
            $formattedDataObjectMap = $this->formatDataObject($dataObject);
            if ($formattedDataObjectMap) {
                array_push($formattedDataListMap, $formattedDataObjectMap);
            }
        }

        return $formattedDataListMap;
    }
888648
private function selectChildSettings(array $instanceList): ?SettingsInterface
    {
        $count = count($instanceList);
        assert($count > 1);
        $selected = $this->selectChildSettingsAmongTwo($instanceList[0], $instanceList[1]);
        if ($selected !== null) {
            for ($index = 2; $index < $count; ++$index) {
                $selected = $this->selectChildSettingsAmongTwo($selected, $instanceList[$index]);
                if ($selected === null) {
                    break;
                }
            }
        }

        return $selected;
    }
1074986
public function index(): void
    {
        $menus = $this->Menus->find('all');

        $this->set(compact('menus'));
        $this->set('_serialize', ['navMenu']);
    }
503583
public function setIcon(string $icon, $showWithNoValue = false): TableListColumn
    {
        $this->setAttribute('icon', $icon);
        $this->setAttribute('showIconWithNoValue', $showWithNoValue);

        return $this;
    }
924854
protected function addMenuPages()
    {
        $this->s::addMenuPageItem([
            'auto_prefix'   => false,
            'parent_page'   => 'index.php',
            'page_title'    => $this->App::CORE_CONTAINER_NAME,
            'menu_title'    => $this->App::CORE_CONTAINER_NAME.' <i class="sharkicon sharkicon-wp-sharks-fin"></i>',
            'template_file' => 's-core/admin/menu-pages/dashboard/default.php',

            'tabs' => [
                'default' => __('License Keys', 'wp-sharks-core'),
                'about'   => sprintf(__('About %1$s', 'wp-sharks-core'), esc_html($this->App::CORE_CONTAINER_NAME)).'  <i class="sharkicon sharkicon-wp-sharks-fin"></i>',
            ],
        ]);
    }
901072
public function setIcon(string $iconPath)
    {
        return $this->setParameter('chrome_web_icon', $iconPath)
            ->setParameter('chrome_icon', $iconPath)
            ->setParameter('adm_small_icon', $iconPath)
            ->setParameter('small_icon', $iconPath);
    }
1177796
public static function setActiveTheme($activeIndex) {
        foreach ($themes = static::getThemes() as $index => $theme) {
            if ($activeIndex !== false && $activeIndex == $index) {
                $themes[$index]['active'] = true;
            } else {
                $themes[$index]['active'] = false;
            }
        }
        static::setThemes($themes);
    }
777226
public function filterList(ItemList $list)
    {
        $localeID = $this->data['localeID'];
        $app = Facade::getFacadeApplication();
        if (isset($this->data['localeID']) && $this->data['localeID'] !== '') {
            $em = $app->make(EntityManager::class);
            $selectedLocale = $em->find(Locale::class, $this->data['localeID']);
            $list->setSiteTreeObject($selectedLocale->getSiteTree());
        }
    }
81859
public function setIgnorePatterns( $list )
	{
		$this->ignorePatterns	= array();
		foreach( array_value( $list ) as $pattern)
			$this->addIgnorePattern( $pattern );	
	}
887699
public function addHtml($menuName, $data, $displayedForCurrentUser, $order, $tooltip)
    {
        if ($displayedForCurrentUser) {
            if (!isset($this->menu[$menuName])) {
                $this->menu[$menuName]['_name'] = $menuName;
                $this->menu[$menuName]['_html'] = $data;
                $this->menu[$menuName]['_order'] = $order;
                $this->menu[$menuName]['_url'] = null;
                $this->menu[$menuName]['_icon'] = '';
                $this->menu[$menuName]['_hasSubmenu'] = false;
                $this->menu[$menuName]['_tooltip'] = $tooltip;
            }
        }
    }
638792
protected function loadIconListing()
    {
        $icons = json_decode(file_get_contents($this->currentSelection));
        $icons = $icons->icons;
        usort($icons, array($this, 'sortIconListing'));
        return $icons;
    }
461177
private function addToWhiteList(array $whiteList) {
        $current = $this->getWhiteList();
        $current = array_merge($current, $whiteList);
        $this->setWhiteList($current);
    }
1296464
protected function addMenu(ItemInterface $parentMenu, $routeName, $menuLabel, $icon = 'fa-bars', $classCss = '')
    {
        $classCss = $classCss.' treeview';

        return $parentMenu->addChild($menuLabel, array(
            'route' => $routeName,
            'label' => sprintf('<i class="fa %s" aria-hidden="true"></i> <span>%s</span>', $icon, $this->translator->trans($menuLabel, array(), $this->translationDomain)),
            'extras' => array(
                'safe_label' => true,
                'translation_domain' => false,
            ),
            'attributes' => array(
                'class' => $classCss,
            ),
        ));
    }