Answer the question
In order to leave comments, you need to log in
From the view, access the class and pull out the attributes?
there is a class User in which there is a method
public function attributeLabels()
{
return $this->commonAttributesLabel() + [
'username' => $this->t('', 'Логин'),
'first_name' => $this->t('', 'Имя'),
'last_name' => $this->t('', 'Фамилия'),
'second_name' => $this->t('', 'Отчество'),
];
}
object(stdClass)[593]
public 'user' =>
object(stdClass)[594]
public 'type' => string 'class' (length=5)
public 'methodTitle' => string 'modelTitle' (length=10)
public 'class' => string '\gm\models\users\tables\Users' (length=30)
public 'fields' =>
object(stdClass)[595]
public 'username' => string 'attribute' (length=9)
public 'first_name' => string 'attribute' (length=9)
public 'last_name' => string 'attribute' (length=9)
public 'second_name' => string 'attribute' (length=9)
Answer the question
In order to leave comments, you need to log in
using the getAttributeLabel() method , for example:$model->getAttributeLabel('username');
Didn't find what you were looking for?
Ask your questionAsk a Question
731 491 924 answers to any question