Term::hasSlugChanged PHP Method

hasSlugChanged() public method

Checks wether slug has changed for given Term id
public hasSlugChanged ( integer $id, string $slug ) : boolean
$id integer Term Id
$slug string Slug
return boolean True if slug has changed
    public function hasSlugChanged($id, $slug)
    {
        if (!is_numeric($id) || !$this->exists($id)) {
            throw new NotFoundException(__d('croogo', 'Invalid Term Id'));
        }
        return $this->field('slug', array($this->escapeField() => $id)) != $slug;
    }