Get or set the parent menu alias.

@param bool|null|string $parent
@return MenuItem|bool|string
431182
public function parent($parent = null)
    {
        if ($parent === null) {
            return $this->_parent;
        }
        $this->_parent = $parent;

        return $this;
    }
789391
public function getAlias($name = null)
    {
        if (is_null($name)) {
            return $this->alias;
        }

        return isset($this->alias[$name]) ? $this->alias[$name] : null;
    }
1344361
public static function parentID($menuLinkID)
    {
        $parentIDs = [];
        while($menuLinkID != null){
            $parentObj = MenuLink::all()->where('menuLinkID', $menuLinkID)->first();
            if ($parentObj) {
                $menuLinkID = $parentObj->parent;
                if ($menuLinkID) {
                    $parentIDs[] = $menuLinkID;
                }
            }
            if ($parentObj || !$menuLinkID) {
                $menuLinkID = null;
            }
        }
        return $parentIDs;
    }
570359
public function setParent(\Neobazaar\Entity\Document $parent = null)
    {
        $this->parent = $parent;
    
        return $this;
    }
1244148
public function alias($alias = null)
    {
        if ($alias !== null) {
            $this->setAlias($alias);
        }

        return $this->getAlias();
    }
609724
public function getChildren(MenuItem $parent = null)
    {
        if ($parent == null) {
            return $this->getTopChildren();
        }
        $result = [];
        foreach ($this->adaptors as $menuAdaptor) {
            $menuAdaptor->adaptChildren($this, $result, $parent, $this->getRequest());
        }

        return $result;
    }
809932
public function parent($css = null)
    {
        if ($css === '') {
            return clone  $this;
        }

        return $this->css('parent::' . ($css === null ? '*' : $css));
    }
1144878
protected function fetchParent()
    {
        $parent = $this->getOption('parent');
        if ($parent instanceof MenuItem)
        {
            $this->setParentItem($parent);
        }

        return $this;
    }
1058405
public function menu( $parent ) {

		global $submenu;

		$custom_component_menus = array();

		$pods_component_menu_items = array();

		foreach ( $this->components as $component => $component_data ) {
			$component_id = $component_data['ID'];

			$component_data['MustUse'] = apply_filters( "pods_component_require_{$component_id}", $component_data['MustUse'], $component_data );

			if ( empty( $component_data['MustUse'] ) && ( ! isset( $this->settings['components'][ $component ] ) || 0 === $this->settings['components'][ $component ] ) ) {
				continue;
			}

			if ( ! empty( $component_data['Hide'] ) ) {
				continue;
			}

			if ( ! empty( $component_data['DeveloperMode'] ) && ! pods_developer() ) {
				continue;
			}

			if ( empty( $component_data['TablelessMode'] ) && pods_tableless() ) {
				continue;
			}

			if ( empty( $component_data['MenuPage'] ) ) {
				if ( ! isset( $component_data['object'] ) ) {
					continue;
				} elseif ( ! method_exists( $component_data['object'], 'admin' ) && ! method_exists( $component_data['object'], 'options' ) ) {
					continue;
				}
			}

			if ( false === $component_data['External'] ) {
				$component_data['File'] = realpath( $this->components_dir . $component_data['File'] );
			}

			if ( ! file_exists( $component_data['File'] ) ) {
				pods_message( 'Pods Component not found: ' . $component_data['File'] );

				pods_transient_clear( 'pods_components' );

				continue;
			}

			$capability = 'pods_component_' . str_replace( '-', '_', sanitize_title( $component ) );

			if ( 0 < strlen( $component_data['Capability'] ) ) {
				$capability = $component_data['Capability'];
			}

			if ( ! pods_is_admin( array( 'pods', 'pods_components', $capability ) ) ) {
				continue;
			}

			$menu_page = 'pods-component-' . $component;

			if ( ! empty( $component_data['MenuPage'] ) ) {
				$custom_component_menus[ $menu_page ] = $component_data;
			}

			$pods_component_menu_items[ $component_data['MenuName'] ] = array(
				'menu_page'  => $menu_page,
				'page_title' => $component_data['Name'],
				'capability' => 'read',
				'callback'   => array( $this, 'admin_handler' ),
			);

			if ( isset( $component_data['object'] ) && method_exists( $component_data['object'], 'admin_assets' ) ) {
				$pods_component_menu_items[ $component_data['MenuName'] ]['assets'] = array(
					$component_data['object'],
					'admin_assets',
				);
			}
		}//end foreach

		/**
		 * Add or change the items in the Pods Components Submenu.
		 *
		 * Can also be used to change which menu components is a submenu of or change title of menu.
		 *
		 * @param array $pods_component_menu_items {
		 *      An array of arguments for add_submenu_page
		 *
		 *     @type string $parent_slug The slug name for the parent menu (or the file name of a standard WordPress admin page)
		 *     @type string $page_title  The text to be displayed in the title tags of the page when the menu is selected
		 *     @type string $menu_title  The text to be used for the menu
		 *     @type string $capability  The capability required for this menu to be displayed to the user.
		 *     @type string $menu_slug   The slug name to refer to this menu by (should be unique for this menu)
		 *     @type string $function    The function to be called to output the content for this page.
		 * }
		 *
		 * @since  2.4.1
		 */
		$pods_component_menu_items = apply_filters( 'pods_admin_components_menu', $pods_component_menu_items );

		ksort( $pods_component_menu_items );

		foreach ( $pods_component_menu_items as $menu_title => $menu_data ) {
			if ( ! is_callable( $menu_data['callback'] ) ) {
				continue;
			}

			$page = add_submenu_page( $parent, strip_tags( $menu_data['page_title'] ), '- ' . strip_tags( $menu_title ), pods_v( 'capability', $menu_data, 'read', true ), $menu_data['menu_page'], $menu_data['callback'] );

			if ( isset( $menu_data['assets'] ) && is_callable( $menu_data['assets'] ) ) {
				add_action( 'admin_print_styles-' . $page, $menu_data['assets'] );
			}
		}

		if ( ! empty( $custom_component_menus ) ) {
			foreach ( $custom_component_menus as $menu_page => $component_data ) {
				if ( isset( $submenu[ $parent ] ) ) {
					foreach ( $submenu[ $parent ] as $sub => &$menu ) {
						if ( $menu[2] === $menu_page ) {
							$menu_page = $component_data['MenuPage'];

							$menu[2] = $menu_page;

							$page = current( explode( '?', $menu[2] ) );

							if ( isset( $component_data['object'] ) && method_exists( $component_data['object'], 'admin_assets' ) ) {
								add_action(
									'admin_print_styles-' . $page, array(
										$component_data['object'],
										'admin_assets',
									)
								);
							}

							break;
						}//end if
					}//end foreach
				}//end if
			}//end foreach
		}//end if
	}
653121
public function setParent(\Enhavo\Bundle\NavigationBundle\Model\NodeInterface $parent = null)
    {
        $this->parent = $parent;

        return $this;
    }
54534
protected function getChildren($parent)
    {
        $key = array_search($parent, $this->getPageForPostTypeIds());

        if ($key && is_post_type_hierarchical($key)) {
            $inMenu = false;

            foreach (get_field('avabile_dynamic_post_types', 'options') as $type) {
                if (sanitize_title(substr($type['post_type_name'], 0, 19)) !== $key) {
                    continue;
                }

                $inMenu = $type['show_posts_in_sidebar_menu'];
            }

            if ($inMenu) {
                return get_posts(array(
                    'post_type' => $key,
                    'post_status' => $this->postStatuses,
                    'post_parent' => 0,
                    'orderby' => 'menu_order post_title',
                    'order' => 'asc',
                    'posts_per_page' => -1,
                    'meta_query'    => array(
                        'relation' => 'OR',
                        array(
                            'key' => 'hide_in_menu',
                            'compare' => 'NOT EXISTS'
                        ),
                        array(
                            'key'   => 'hide_in_menu',
                            'value' => '0',
                            'compare' => '='
                        )
                    )
                ), 'OBJECT');
            }

            return array();
        }

        return get_posts(array(
            'post_parent' => $parent,
            'post_type' => get_post_type($parent),
            'post_status' => $this->postStatuses,
            'orderby' => 'menu_order post_title',
            'order' => 'asc',
            'posts_per_page' => -1,
            'meta_query'    => array(
                'relation' => 'AND',
                array(
                    'relation' => 'OR',
                    array(
                        'key' => 'hide_in_menu',
                        'compare' => 'NOT EXISTS'
                    ),
                    array(
                        'key'   => 'hide_in_menu',
                        'value' => '0',
                        'compare' => '='
                    )
                )
            )
        ), 'OBJECT');
    }
418328
public function getAlias()
    {
        if ($this->hasParent() && !$this->alias) {
            return $this->getParent()->getAlias();
        }

        return $this->alias;
    }
779230
public function setParent(\Haven\CmsBundle\Entity\TextContent $parent = null)
    {
        $this->parent = $parent;
    
        return $this;
    }
970153
function get_parent(){
		if( !is_null($this->pidx) && isset(self::$reg[$this->pidx]) ){
			return self::$reg[$this->pidx];
		}
		else {
			return null;
		}
	}
1127226
public function setParent(DataContainer $parent = null)
	{
		$this->parent = $parent;

		if ($this->parent)
		{
			$this->enableParent();
		}
		else
		{
			$this->disableParent();
		}

		return $this;
	}
463254
public function setParent(\Haven\PersonaBundle\Entity\Enterprise $parent = null) {
        $this->parent = $parent;

        return $this;
    }
240315
public function setParent(\Haven\CoreBundle\Entity\ExternalLink $parent = null)
    {
        $this->parent = $parent;
    
        return $this;
    }