Polyglot\PolyglotObserver::extractTranslatedAttributes PHP Метод

extractTranslatedAttributes() защищенный Метод

protected extractTranslatedAttributes ( Polyglot &$model ) : array
$model Polyglot
Результат array
    protected function extractTranslatedAttributes(Polyglot &$model)
    {
        $attributes = $model->getAttributes();
        $polyglot = $model->getPolyglotAttributes();
        $translated = array();
        foreach ($attributes as $key => $value) {
            if (in_array($key, $polyglot)) {
                $translated[$key] = $value;
                unset($model[$key]);
            }
        }
        return $translated;
    }