Get the slug for the menu item.

@api
@example
```twig
<ul>
{% for item in menu.items %}
<li class="{{ item.slug }}">
<a href="{{ item.link }}">{{ item.name }}</a>
</li>
{% endfor %}
</ul>
```
@return string The URL-safe slug of the menu item.
343451
public function slug() {
		$mo = $this->master_object();
		if ( $mo && $mo->post_name ) {
			return $mo->post_name;
		}
		return $this->post_name;
	}
770050
protected function getCategoryUrl()
    {
        $rootKey = $this->container->getParameter('sulu_product.category_root_key');

        if (null !== $rootKey) {
            return $this->generateUrl(
                'get_category_children',
                ['key' => $rootKey, 'flat' => 'true', 'sortBy' => 'depth', 'sortOrder' => 'asc']
            );
        }

        return $this->generateUrl(
            'get_categories',
            ['flat' => 'true', 'sortBy' => 'depth', 'sortOrder' => 'asc']
        );
    }
1032434
public function get_url() {
        $url = new \moodle_url('/grade/edit/scale/index.php');
        if ($this->courseid) {
            $url->param('id', $this->courseid);
        }
        return $url;
    }
1242997
public function indexUrl()
    {
        $route = 'admin::edit-menu';
        if (Route::has($route)) {
            return route($route, $this->menu_id);
        }

        return route('dashboard');
    }
842700
public function getSlug() : ?string 
    {
        if ( ! $this->hasSlug()) {
            $this->setSlug($this->getDefaultSlug());
        }
        return $this->slug;
    }
91225
public function editUrl()
    {
        $route = 'admin::edit-menulink';
        if (Route::has($route)) {
            return route($route, [$this->menu_id, $this->id]);
        }

        return route('dashboard');
    }
1216213
protected function getSlugList() : array
    {
        $arResult = [$this->slug];

        $obParentCategory = $this->parent;
        while ($obParentCategory->isNotEmpty()) {
            $arResult[] = $obParentCategory->slug;
            $obParentCategory = $obParentCategory->parent;
        }

        return $arResult;
    }
147932
public function getItem() {
		$item = new stdClass;
		$item->title = $this->getAttribute('name');
		if (empty($this->title)) {
			$item->title = $this->getId();
		}
		if ($this->hasAttribute('url')) {
			$item->url = $this->getAttribute('url');
		}
		return $item;
	}
445289
public function &GetBreadcrumb()
    {
        $oBreadCrumb = &$this->GetFromInternalCache('oCategoryBreadcrumb');
        if (is_null($oBreadCrumb)) {
            $oBreadCrumb = &TdbShopCategoryList::GetCategoryPath($this->id, null, $this->GetLanguage());
            $this->SetInternalCache('oCategoryBreadcrumb', $oBreadCrumb);
        } else {
            $oBreadCrumb->GoToStart();
        }

        return $oBreadCrumb;
    }
1338559
protected function getResource()
    {
        $resource = str_replace(url()->to(''), '', app('request')->server->get('HTTP_REFERER'));
        return str_slug($resource);
    }
906043
public function slugs()
    {
        $slugs = collect();

        $this->all()->each(function ($item) use ($slugs)
        {
            $slugs->push($item['slug']);
        });

        return $slugs;
    }
1025992
public function getSeoUri()
    {
        if ( ! empty( $this->_seoUri ) )
        {
            return $this->_seoUri;
        }

        if ( empty( $this->id ) )
        {
            return '';
        }

        if ( empty( $this->_seoUri ) )
        {
            $this->_seoUriStructure = $this->getUriStructure( array(
                $this->getMapper()
                     ->getLocale()
            ) );

            if ( ! empty( $this->_seoUriStructure ) )
            {
                $this->_seoUri = $this->_seoUriStructure->uri;
            }
        }

        return $this->_seoUri;
    }
179457
public function getFullPathAttribute()
    {
        $pathSections = explode('/', $this->getFullPath());

        $slugsToExclude = array_wrap($this->domainMappedFolders);

        $finalSlug = collect($pathSections)
            ->filter()
            ->reject(function ($slug) use ($slugsToExclude) {
                return in_array($slug, $slugsToExclude);
            })
            ->implode('/');

        return str_start($finalSlug, '/');
    }
65218
public function getChainedNameAttribute(): string
    {
        $categories = $this->breadcrumbLinks;
        $names = [];

        foreach ($categories as $url => $categoryName) {
            $names[] = $categoryName;
        }

        return implode(' -> ', $names);
    }
1258801
public function get_description() {
        if ($this->is_course_item() || $this->is_category_item()) {
            $categoryitem = $this->load_item_category();
            return $categoryitem->get_description();
        }
        return '';
    }
752625
protected function getMenuList()
    {
        $links = $this->menu->getMenuList();
        $links->addParameterSources($this->request, $this->menu->getParameterSource());

        $source = new \Gems_Menu_ParameterSource(array(
            'gro_id_track' => $this->trackId,
            'gro_id_round' => $this->trackEngine->getPreviousRoundId($this->roundId),
            ));

        $links->append($this->menu->getCurrent()->toActionLink(true, \MUtil_Html::raw($this->_('&lt; Previous')), $source));
        $links->addCurrentParent($this->_('Cancel'));
        $links->addCurrentChildren();
        $links->addCurrentSiblings();

        $source->offsetSet('gro_id_round', $this->trackEngine->getNextRoundId($this->roundId));
        $links->append($this->menu->getCurrent()->toActionLink(true, \MUtil_Html::raw($this->_('Next &gt;')), $source));

        return $links;
    }
52625
public static function getCurrentSlug()
    {
        // Defintions
        $slug = self::get('post_type', '');

        // Define current post type's contents
        if (empty($slug)) {
            // Get slug by post type
            $post = self::get('post', 0);

            if (!empty($post)) {
                return get_post_type($post);
            }

            global $pagenow;

            // Custom page slug
            if (in_array($pagenow, ['admin.php'])) {
                return 'admin';
            }

            // Post slug
            if (in_array($pagenow, ['edit.php', 'post-new.php', 'post.php', 'edit-tags.php'])) {
                return 'post';
            }

            // Comment slug
            if (in_array($pagenow, ['edit-comments.php', 'comment.php'])) {
                return 'comment';
            }

            // Media slug
            if (in_array($pagenow, ['upload.php', 'media-new.php'])) {
                return 'attachment';
            }

            // User slug
            if (in_array($pagenow, ['users.php', 'user-new.php', 'user-edit.php', 'profile.php'])) {
                return 'user';
            }

            // Appearance slug
            if ('nav-menus.php' == $pagenow) {
                return 'nav_menu_item';
            }
        }

        return $slug;
    }