src/Observers/AttributeObserverTrait.php
/**
     * Initialize's and return's a new entity with the status 'create'.
     *
     * @param array $attr The attributes to merge into the new entity
     *
     * @return array The initialized entity
     */
Initialize's and return's a new entity with the status 'create'.
@param array $attr The attributes to merge into the new entity

@return array The initialized entity
Initialize ' s and return ' s a new entity with the status ' create ' . @param array $attr The attributes to merge into the new entity @return array The initialized entity
protected function initializeEntity(array $attr = array())
    {
        $this->operation = OperationNames::CREATE;
        if (array_key_exists($this->attributeCode, $this->getDefaultColumnValues()) === false && ($this->attributeValue === '' || $this->attributeValue == null)) {
            $this->operation = OperationNames::SKIP;
        }
        return parent::initializeEntity($attr);
    }
protected function initializeEntity ( array $ attr = array ( ) ) { $ this -> operation = OperationNames :: CREATE ; if ( array_key_exists ( $ this -> attributeCode , $ this -> getDefaultColumnValues ( ) ) === false && ( $ this -> attributeValue === '' || $ this -> attributeValue == null ) ) { $ this -> operation = OperationNames :: SKIP ; } return parent :: initializeEntity ( $ attr ) ; }
Initialize's and return's a new entity with the status 'create'.
Initialize ' s and return ' s a new entity with the status ' create ' .
// initialize the operation name // query whether or not the colunm IS empty and it is NOT in the // array with the default column values, because in that case we // want to skip processing the attribute // initialize the entity with the passed data