-1
아래 코드에서 사용자 이름과 암호 필드에 액세스하는 방법을 사용하고 싶습니다.symfony 3의 양식 데이터에서 필드에 액세스하는 방법
AppBundle\Entity\MasterUserAccount Object
(
[id:AppBundle\Entity\MasterUserAccount:private] =>
[firstName:AppBundle\Entity\MasterUserAccount:private] =>
[lastName:AppBundle\Entity\MasterUserAccount:private] =>
[username:AppBundle\Entity\MasterUserAccount:private] => test
[password:AppBundle\Entity\MasterUserAccount:private] => 123456
[createdBy:AppBundle\Entity\MasterUserAccount:private] =>
[updatedBy:AppBundle\Entity\MasterUserAccount:private] =>
[createdAt:AppBundle\Entity\MasterUserAccount:private] =>
[updatedAt:AppBundle\Entity\MasterUserAccount:private] =>
[status:AppBundle\Entity\MasterUserAccount:private] =>
)
$data = $form->getData();
$username = $data['username'];
나는 아래의 오류를 다음과 같은 오류를 받고 있어요
배열로
감사합니다. 그것은 올바르게 작동했습니다. 감사합니다. – user1965773