original_string: public function beforeSave(Event $event, EntityInterface $entity, $options)
      {
          if (isset($options['ignoreCounterCache']) && $options['ignoreCounterCache'] === true) {
              return;
          }
  
          foreach ($this->_config as $assoc => $settings) {
              $assoc = $this->_table->getAssociation($assoc);
              foreach ($settings as $field => $config) {
                  if (is_int($field)) {
                      continue;
                  }
  
                  $registryAlias = $assoc->getTarget()->getRegistryAlias();
                  $entityAlias = $assoc->getProperty();
  
                  if (!is_callable($config) &&
                      isset($config['ignoreDirty']) &&
                      $config['ignoreDirty'] === true &&
                      $entity->$entityAlias->isDirty($field)
                  ) {
                      $this->_ignoreDirty[$registryAlias][$field] = true;
                  }
              }
          }
      }
code: public function beforeSave(Event $event, EntityInterface $entity, $options)
      {
          if (isset($options['ignoreCounterCache']) && $options['ignoreCounterCache'] === true) {
              return;
          }
  
          foreach ($this->_config as $assoc => $settings) {
              $assoc = $this->_table->getAssociation($assoc);
              foreach ($settings as $field => $config) {
                  if (is_int($field)) {
                      continue;
                  }
  
                  $registryAlias = $assoc->getTarget()->getRegistryAlias();
                  $entityAlias = $assoc->getProperty();
  
                  if (!is_callable($config) &&
                      isset($config['ignoreDirty']) &&
                      $config['ignoreDirty'] === true &&
                      $entity->$entityAlias->isDirty($field)
                  ) {
                      $this->_ignoreDirty[$registryAlias][$field] = true;
                  }
              }
          }
      }
code_tokens: public function beforeSave ( Event $ event , EntityInterface $ entity , $ options ) { if ( isset ( $ options [ 'ignoreCounterCache' ] ) && $ options [ 'ignoreCounterCache' ] === true ) { return ; } foreach ( $ this -> _config as $ assoc => $ settings ) { $ assoc = $ this -> _table -> getAssociation ( $ assoc ) ; foreach ( $ settings as $ field => $ config ) { if ( is_int ( $ field ) ) { continue ; } $ registryAlias = $ assoc -> getTarget ( ) -> getRegistryAlias ( ) ; $ entityAlias = $ assoc -> getProperty ( ) ; if ( ! is_callable ( $ config ) && isset ( $ config [ 'ignoreDirty' ] ) && $ config [ 'ignoreDirty' ] === true && $ entity -> $ entityAlias -> isDirty ( $ field ) ) { $ this -> _ignoreDirty [ $ registryAlias ] [ $ field ] = true ; } } } }
docstring: beforeSave callback.
  
  Check if a field, which should be ignored, is dirty
  
  @param \Cake\Event\Event $event The beforeSave event that was fired
  @param \Cake\Datasource\EntityInterface $entity The entity that is going to be saved
  @param \ArrayObject $options The options for the query
  @return void
docstring_tokens: beforeSave callback .