original_string: public function afterSave(Event $event, EntityInterface $entity)
      {
          if (!$this->_config['level'] || $entity->isNew()) {
              return;
          }
  
          $this->_setChildrenLevel($entity);
      }
code: public function afterSave(Event $event, EntityInterface $entity)
      {
          if (!$this->_config['level'] || $entity->isNew()) {
              return;
          }
  
          $this->_setChildrenLevel($entity);
      }
code_tokens: public function afterSave ( Event $ event , EntityInterface $ entity ) { if ( ! $ this -> _config [ 'level' ] || $ entity -> isNew ( ) ) { return ; } $ this -> _setChildrenLevel ( $ entity ) ; }
docstring: 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
docstring_tokens: After save listener .