public getPolyglotAttributes ( ) : array | ||
Результат | array |
public function getPolyglotAttributes()
{
return array_merge($this->polyglot, array('lang'));
}
/** * @param Polyglot $model * * @return 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; }