protected MenuParentFormSelector::getParentDepthLimit($id)
Returns the maximum depth of the possible parents of the menu link.
string $id: The menu link plugin ID or an empty value for a new link.
int The depth related to the depth of the given menu link.
protected function getParentDepthLimit($id) { if ($id) { $limit = $this->menuLinkTree->maxDepth() - $this->menuLinkTree->getSubtreeHeight($id); } else { $limit = $this->menuLinkTree->maxDepth() - 1; } return $limit; }
© 2001–2016 by the original authors
Licensed under the GNU General Public License, version 2 and later.
Drupal is a registered trademark of Dries Buytaert.
https://api.drupal.org/api/drupal/core!lib!Drupal!Core!Menu!MenuParentFormSelector.php/function/MenuParentFormSelector::getParentDepthLimit/8.1.x