public function afterSave(Event $event, EntityInterface $entity)
    {
        if (!$this->_config['level'] || $entity->isNew()) {
            return;
        }

        $this->_setChildrenLevel($entity);
    }
public function afterSave(Event $event, EntityInterface $entity)
    {
        if (!$this->_config['level'] || $entity->isNew()) {
            return;
        }

        $this->_setChildrenLevel($entity);
    }
public function afterSave ( Event $ event , EntityInterface $ entity ) { if ( ! $ this -> _config [ 'level' ] || $ entity -> isNew ( ) ) { return ; } $ this -> _setChildrenLevel ( $ entity ) ; }
After save listener.

Manages updating level of descendants of currently saved entity.

@param \Cake\Event\Event $event The afterSave event that was fired
@param \Cake\Datasource\EntityInterface $entity the entity that is going to be saved
@return void
After save listener .