public function setSlug($slug)
    {
        $slug = $this->translator()->translation($slug);
        if ($slug !== null) {
            $this->slug = $slug;

            $values = $this->slug->data();
            foreach ($values as $lang => $val) {
                $this->slug[$lang] = $this->slugify($val);
            }
        } else {
            /** @todo Hack used for regenerating route */
            if (isset($_POST['slug'])) {
                $this->slug = [];
            } else {
                $this->slug = null;
            }
        }

        return $this;
    }
public function setSlug($slug)
    {
        $slug = $this->translator()->translation($slug);
        if ($slug !== null) {
            $this->slug = $slug;

            $values = $this->slug->data();
            foreach ($values as $lang => $val) {
                $this->slug[$lang] = $this->slugify($val);
            }
        } else {
            /** @todo Hack used for regenerating route */
            if (isset($_POST['slug'])) {
                $this->slug = [];
            } else {
                $this->slug = null;
            }
        }

        return $this;
    }
public function setSlug ( $ slug ) { $ slug = $ this -> translator ( ) -> translation ( $ slug ) ; if ( $ slug !== null ) { $ this -> slug = $ slug ; $ values = $ this -> slug -> data ( ) ; foreach ( $ values as $ lang => $ val ) { $ this -> slug [ $ lang ] = $ this -> slugify ( $ val ) ; } } else { /** @todo Hack used for regenerating route */ if ( isset ( $ _POST [ 'slug' ] ) ) { $ this -> slug = [ ] ; } else { $ this -> slug = null ; } } return $ this ; }
Set the object's URL slug.

@param  mixed $slug The slug.
@return RoutableInterface Chainable
Set the object s URL slug .