src/Model/Behavior/TokenizeBehavior.php
public function fields(EntityInterface $entity)
    {
        $fields = [];
        foreach ((array)$this->getConfig('fields') as $field) {
            if (!$entity->isDirty($field)) {
                continue;
            }
            $fields[$field] = $entity->$field;
            $entity->setDirty($field, false);
        }

        return $fields;
    }
public function fields(EntityInterface $entity)
    {
        $fields = [];
        foreach ((array)$this->getConfig('fields') as $field) {
            if (!$entity->isDirty($field)) {
                continue;
            }
            $fields[$field] = $entity->$field;
            $entity->setDirty($field, false);
        }

        return $fields;
    }
public function fields ( EntityInterface $ entity ) { $ fields = [ ] ; foreach ( ( array ) $ this -> getConfig ( 'fields' ) as $ field ) { if ( ! $ entity -> isDirty ( $ field ) ) { continue ; } $ fields [ $ field ] = $ entity -> $ field ; $ entity -> setDirty ( $ field , false ) ; } return $ fields ; }
Returns fields that have been marked as protected.

@param \Cake\Datasource\EntityInterface $entity Entity
@return array
Returns fields that have been marked as protected .