src/Model/Behavior/SluggedBehavior.php
public function needsSlugUpdate(EntityInterface $entity, $deep = false) {
		foreach ((array)$this->_config['label'] as $label) {
			if ($entity->isDirty($label)) {
				return true;
			}
		}
		if ($deep) {
			$copy = clone $entity;
			$this->slug($copy, ['overwrite' => true]);
			return $copy->get($this->_config['field']) !== $entity->get($this->_config['field']);
		}
		return false;
	}
public function needsSlugUpdate(EntityInterface $entity, $deep = false) {
		foreach ((array)$this->_config['label'] as $label) {
			if ($entity->isDirty($label)) {
				return true;
			}
		}
		if ($deep) {
			$copy = clone $entity;
			$this->slug($copy, ['overwrite' => true]);
			return $copy->get($this->_config['field']) !== $entity->get($this->_config['field']);
		}
		return false;
	}
public function needsSlugUpdate ( EntityInterface $ entity , $ deep = false ) { foreach ( ( array ) $ this -> _config [ 'label' ] as $ label ) { if ( $ entity -> isDirty ( $ label ) ) { return true ; } } if ( $ deep ) { $ copy = clone $ entity ; $ this -> slug ( $ copy , [ 'overwrite' => true ] ) ; return $ copy -> get ( $ this -> _config [ 'field' ] ) !== $ entity -> get ( $ this -> _config [ 'field' ] ) ; } return false ; }
Method to find out if the current slug needs updating.

The deep option is useful if you cannot rely on dirty() because
of maybe some not in sync slugs anymore (saving the same title again,
but the slug is completely different, for example).

@param \Cake\Datasource\EntityInterface $entity
@param bool $deep If true it will generate a new slug and compare it to the currently stored one.
@return bool
Method to find out if the current slug needs updating .