src/Model/Behavior/SlugBehavior.php
protected function _getPartsFromEntity($entity)
    {
        $parts = [];
        foreach ((array)$this->getConfig('displayField') as $displayField) {
            $value = Hash::get($entity, $displayField);

            if ($value === null && !$entity->isNew()) {
                return [];
            }

            if (!empty($value) || is_numeric($value)) {
                $parts[] = $value;
            }
        }

        return $parts;
    }
protected function _getPartsFromEntity($entity)
    {
        $parts = [];
        foreach ((array)$this->getConfig('displayField') as $displayField) {
            $value = Hash::get($entity, $displayField);

            if ($value === null && !$entity->isNew()) {
                return [];
            }

            if (!empty($value) || is_numeric($value)) {
                $parts[] = $value;
            }
        }

        return $parts;
    }
protected function _getPartsFromEntity ( $ entity ) { $ parts = [ ] ; foreach ( ( array ) $ this -> getConfig ( 'displayField' ) as $ displayField ) { $ value = Hash :: get ( $ entity , $ displayField ) ; if ( $ value === null && ! $ entity -> isNew ( ) ) { return [ ] ; } if ( ! empty ( $ value ) || is_numeric ( $ value ) ) { $ parts [ ] = $ value ; } } return $ parts ; }
Gets the parts from an entity

@param \Cake\Datasource\EntityInterface $entity Entity
@return array
Gets the parts from an entity