public function save($entity, array $data = [])
    {
        try {
            if (empty($data)) {
                return $entity->save();
            }

            $this->saveInternal($entity, $data);

            return true;
        } catch (\Exception $ex) {
            Yii::$app->getErrorHandler()->logException($ex);
        }

        return false;
    }
public function save($entity, array $data = [])
    {
        try {
            if (empty($data)) {
                return $entity->save();
            }

            $this->saveInternal($entity, $data);

            return true;
        } catch (\Exception $ex) {
            Yii::$app->getErrorHandler()->logException($ex);
        }

        return false;
    }
public function save ( $ entity , array $ data = [ ] ) { try { if ( empty ( $ data ) ) { return $ entity -> save ( ) ; } $ this -> saveInternal ( $ entity , $ data ) ; return true ; } catch ( \ Exception $ ex ) { Yii :: $ app -> getErrorHandler ( ) -> logException ( $ ex ) ; } return false ; }
Save entity.

@param EmailTemplate $entity
@param array         $data

@return bool
Save entity .