Код: Выделить всё
'email:email',
'created_at:date'
Код: Выделить всё
'email:email',
'created_at:date'
Код: Выделить всё
namespace app\components;
class Formatter extends \yii\i18n\Formatter
{
public function asName($value) {
if ($value === null) {
return $this->nullDisplay;
}
return ...;
}
}
Код: Выделить всё
'components' => [
...
'formatter' => [
'class' => 'app\components\Formatter',
],
],
супер! То есть через все конфиг, что хочется расширить можно переопределить и дополнить походим образом?ElisDN писал(а):Код: Выделить всё
namespace app\components; class Formatter extends \yii\i18n\Formatter { public function asName($value) { if ($value === null) { return $this->nullDisplay; } return ...; } }
Код: Выделить всё
'components' => [ ... 'formatter' => [ 'class' => 'app\components\Formatter', ], ],