przewiń do treści

Symfony 2 od podstaw

Włodzimierz Gajda

//fragment pliku Entity\User.php

/**
 * Set profil
 *
 * @param My\FrontendBundle\Entity\Profil $profil
 */
public function setProfil(\My\FrontendBundle\Entity\Profil $profil)
{
    $this->profil = $profil;
}

/**
 * Get profil
 *
 * @return My\FrontendBundle\Entity\Profil
 */
public function getProfil()
{
    return $this->profil;
}

Listing 31.5. Metody klasy User wygenerowane automatycznie dla właściwości z listingu 31.4

Rozdział 31. Relacje 1:1

listing-31-05.txt

Reklama

Szkolenia z Symfony 2.1
©2012 Włodzimierz Gajda
ver. 1.0.1